CSE 3214 : Programming Assignment 2
This lab should be submitted using the submit
command (see the instructions below).
Objective:
The objective of this assignment is to build the skeleton of a simple network
resource measurement system. You are required to measure the bandwidth
and roundtrip delay between two hosts periodically and implement a simple
predictor for predicting the same values.
The delay measurement is the same as before. The values of bandwidth that
you get will likely vary depending on the file size you use for determining bandwidth.
In the report, show the variation of the measurements with the file size. Also recommend
a file size to use.
For the predictor, you may use the one used by TCP to estimate RTT, or you can propose
your own. Remember you do not need to be as computationally simple as TCP. You should
measure the effectiveness of your predictor by recording the error (deviation) between the
proposed and sample values.
The core of this assignment was implemented in the last one. In fact you need to write
very little new code. You do noed to THINK about what parameter values to use and how
to setup experiments and measure and present data.
So, as before, you should use a client/server application that does the following.
-
The concurrent server program runs waiting for a connection from a client.
- The clients and the server should run on different machines.
-
Each client opens A UDP connection to the server and sends it a stream of
k packets, each t seconds after the previous one, containing a sequence number.
-
The server acknowledges each packet by sending back an ACK containing the
same sequence number.
-
The client maintains a running average of the delay it sees between the
server and itself. For your output, dump this into a file at the client side.
-
Repeat the above with a TCP client and server.
-
This is meant to be a simple program, you probably will need to impose
some limitations; that is fine, just state them clearly.
- You will lose points if your program does not close the sockets
when the program quits.
-
In order to prevent two students from using the same socket number on the
same machine, you should use the socket number that is 2000 + x/2, where x is
the last 4 digits of your student number (take floors if needed).
-
You may use C/C++ or Java. Resources for network programming in either
language are on the class page.
-
Check the class page for clarifications etc.
Compiling the server and client
programs (C language only)
-
Compile the programs with gcc instead of cc.
-
For the server program, you need the -lsocket flag
-
For the client program, you need the flags -lsocket -lnsl
Instructions for submitting assignment 2
Submit the programs using the following command:
- submit 3214 a2 filename. Do not submit directories. Do not submit zipped, gzipped, tarred or otherwise archived files.
- Read the manpages ("man submit") for more details on the submit command.
-
The programs you submit should work and be documented.
-
Your assignment should include a separate (typed) document containing the
results (You can hand this in the class). This document should contains details
of
- the overall program design, a textual description of "how it works", and
design decisions made. Mention some applications that would use a service
like this one.
- Present your measurements of bandwidth and delay.
- Present your measurements of the effectiveness of your predictor.
- possible improvements and extensions to your program that you would do if you
were designing a marketable product.
- situations (if any) when your program may not work correctly.
- how the grader can compile and run your program.
Grading
Program works correctly : 25%
quality of code and in-line documentation : 25%
report : 50%
NOTE: Late submissions get no credit.
Copying, teamwork
Copying of programs (also written homeworks and exams) or teamwork on
an assignment (written or programming) is not permitted. No form
of copying is tolerated in this (or any) course, in accordance with
departmental policy.