Network Programming

Project 1

20 Points

For this project you are to prepare a UDP client/server pair to investigate the effects of different packet sizes and of using multiple active packets on the transmission rate between orca and one of the lab computers. The programs should be named udp_client and udp_server. You may use C or C++.

Testing Packet Sizes

To test the effect of packet sizes, your client should send a message of size n and wait for a acknowledgement of size 1. This should be done enough times to take a few seconds so that reasonable times may be achieved. You will not have a dedicated network, so the timings will vary. You can accept the minimum time of several tests.

You should test packet sizes from 1 byte to the maximum which works with UDP. Do not try every size. I suggest trying 1, 100, 500, 1000, 1500, 2000...

Testing Multiple Active Packets

Orca and the TEC207 and JST lab computers have 2 routers between them. This makes it possible to have messages in transmit from orca to the first router, from the first router to the second router, and from the second router to workstation all at the same time. So it should be possible to send 3 or 4 packets before waiting for the first ACK. Then the main loop could send a packet and receive an ACK in each interation. Finally there would be a few outstanding ACKs to receive to complete the job.

You should test the multiple packet feature with a sensible packet size based on the other analysis with the number of active packets varying from 1 to 5. I am guessing that the benefit will be minimal after you fill all the wires.

It is not necessary to test all combinations of packet sizes and active packet counts.

Warnings

We will be purposefully consuming network bandwidth and if your programs have errors you could negatively affect orca and/or other systems. For that reason I am expecting you to test your program initially only on a Linux workstation and not on orca. You have access to lots of Linux machines and you can run the client and server on the same machine. Please do so until your programs work reliably and finish within a few seconds. It is critical to not send lots of packets without ACKs.

After your program works well on a single Linux workstation, it will be time to test it on orca along with the workstation.

When you test your programs, start with short runs which should complete in less than 1 second. Keep windows open on both the client and server computers, so that if a run gets stuck for some reason you can immediately kill both client and server. If we cause problems we will be asked to refrain from such testing. I will send email announcing a change if necessary. We will not notice the effect of multiple windows

Program Design

Your programs should get all required input from command-line parameters. Within that constraint you are free to design the interface.

Project Submission

Since this is a team project, I will expect one of the team members from each team to submit files electronically. I plan to record the same grade for all team members. Submit each file with a command like

     ~seyfarth/bin/submit csc305 person.h

Report

Your should turn in a short report detailing how to compile and run your programs and also showing and explaining your timing results. I would expect that at least 2 typed pages would be required. The quality of the report will be a factor in grading.