Assignment #0 - Socket Programming and Network Measurements

Due on Thursday, September 8. Please email your written report (in PDF or PostScript) to the TA by midnight September 8. Late turn-ins will NOT be accepted.

The purpose of this assignment is to give you experience on socket-based network programming and basic techniques of network measurements. Sockets are the key interface between applications and networking systems. In this assignment you are asked to write simple programs with TCP/UDP sockets. You can write your program in C/C++ or Java. However, I strongly encourage you write it in C/C++ since Java contains unnecessary fat that makes accurate measurement sometimes difficult. In particular, you may not be able to use a high resolution timer (see below for details) if you program in Java.

Warmup on Socket Programming:
This part is a warmup on socket programming and it will NOT be graded. You can skip it if you are already fairly familiar with socket programming. For this part, you will implement a client and a server that communicate to each other over the network. The server basically echoes back the client input message with some slight change. Specifically, for an input string from the client, the server returns one with all upper case letters replaced by lower case letters and every space changed to a '.'. Below are some additional operational details about the client and server:

Here is an example how your server should work. Assume that you start a server on machine foo.cs.rochester.edu (this machine doesn't really exist, find one yourself) listening to port number 32000. The syntax should look like the following:

Then you run a client on machine foobar.cs.rochester.edu using the following arguments:

The Real Assignment:

For the measurements, you may need to repeat the experiment several times and then take the average. You may find the following high resolution timer useful--- hrtimer_x86.h and hrtimer_x86.cc. Your goal is to produce STABLE measurement results.

Turn-in:
You should turn in a written report for this assignment and indicate the location of your source code for solving each question.