Summary: CS 428/528 Programming Assignment 1
Due Friday Sept. 23 at 9pm; submit through blackboard
Please use C or C++. This is an individual project.
Part I: UDP and TCP performance
Measure the performance (both latency and throughput) of sockets on the machines in the G-POD. To
accomplish this, you have to write a simple client server program that you can to exchange messages and
measure performance. The server and the client should each run on a different machine (although it may be
interesting to evaluate the results when they are both on the same machine).
To measure round-trip latency, use UDP and TCP to send and receive messages of size 1-byte, 100-bytes,
200-bytes, 300-bytes, ..., and 1000-bytes. Report the round-trip time for each protocol. Help on measuring
time is below.
Start with UDP it is easier because it is message oriented. To measure throughput, send messages of
size 1KByte, 2KBytes, 4KBytes, 8KBytes, 16KBytes, and 32KBytes in one direction, with a message of
the same size echoed back in the reverse direction.
TCP presents a challenge that I will leave up to you to solve. Specifically, it is stream oriented. To the
application, there are no messages there is only one continuous stream of data. When you do a receive,
whatever is there may be received (multiple messages, or part of a message). So, if you send 5 messages,
they may be all received with a single receive on the other side. Alternatively, if you send a big message,
only part of it may be received on the other side. So, it is a challenge to match up your sends and receives.
You may assume that you know the expected message size. Remember that receive tells you how many