Measure the latency and throughput of TCP and/or UDP (as noted
below) across at least three pairs of machines using at least two
different networks. For example, two CS servers (like wolf and
pi), or a CS server to a laptop, wired or wireless, or off-campus.
Create a web page with graphs summarizing your results. Include
the following measurements:
For timing, use System.nanoTime (or the closest equivalent if
using other languages). Read through the
Java networking tutorial. Also see
SimpleService.java and EchoClient.java
for some stripped-down examples of using server and client sockets.
When using non-CS machines and networks, minimize unnecessary
traffic while developing your programs. Beware of firewalls.
- Measure round-trip latency as a function of message
size, by sending and receiving (echoing) messages of size
1, 64, and 1024 bytes, using both TCP and UDP. Measure RTTs.
- Measure throughput by sending TCP messages of size 1K, 16K,
64K, 256K, and 1M bytes in each direction. Measure transfer
- Measure the interaction between message size and number of
messages using TCP and UDP by sending 1MByte of data (with a
1-byte acknowledgment in the reverse direction) using
different numbers of messages: 1024 1024Byte messages, vs 2048
512Byte messages, vs 4096 X 256Byte messages.