| CS 455/555 - Intro to Networks and Communications
Fall 2009: Tues/Thurs 3-4:15pm, Spong 0108 |
|
Staff
Syllabus (pdf) |
Program 4: Alternating Bit Reliable TransportAssigned: Tuesday, November 10, 2009 Note: I have changed the examples to match the description of the program. Previously, telling the sender to send 5 messages would have sent messages with data 0-5 (6 messages). Your program (and the new examples) should have the correct behavior of sending messages with data 0-4 (5 messages). -MCW 11/25 @ 9:30am NOTE: Program 4 is required for CS 555 only. CS 455 students can complete this program for extra-credit. To receive extra-credit, the program must work completely.
DescriptionThe goal of this assignment is to implement the alternating bit reliable transport protocol that you designed in your last homework assignment. You will implement both a sender and a receiver. Sender
Receiver
Rules
TestingA large part of your program's grade will be determined by how well it handles a set of inputs. You should test your program rigorously before submitting. Because your programs will be run and tested using a script, you must format your output exactly as I have described or you will lose points. Example 1 antares> java AbrtReceiver
Usage: java AbrtReceiver port delay lossRate [seed]
port - listening port (10001-11000)
delay - avg delay (ms)
lossRate - loss percentage [0-1]
seed - RNG seed (optional)
vega> java AbrtSender
Usage: java AbrtSender host port msgs
host - receiver hostname
port - receiver port (10001-11000)
msgs - number of unique messages to send
Example 2 antares> java AbrtReceiver 10005 4 40 ERR - arg 3 Example 3 antares> java AbrtReceiver 10005 500 0.1 7777 RECV: 0 0 4 SENT: ACK 0 - delayed 425 ms RECV: 1 1 4 SENT: ACK 1 - not sent RECV: 1 1 4 SENT: ACK 1 - delayed 577 ms RECV: 0 2 4 SENT: ACK 0 - delayed 701 ms RECV: 1 3 4 SENT: ACK 1 - delayed 872 ms vega> java AbrtSender antares 10005 4 SENT: 0 0 4 RECV: ACK 0 SENT: 1 1 4 - timeout SENT: 1 1 4 RECV: ACK 1 SENT: 0 2 4 RECV: ACK 0 SENT: 1 3 4 RECV: ACK 1 Note: The packets dropped and the amount of delays should be exactly as in this example since a seed was specified on the command-line.
Example 4 antares> java AbrtReceiver 10005 150 0.2 7890 RECV: 0 0 4 SENT: ACK 0 - not sent RECV: 0 0 4 SENT: ACK 0 - not sent RECV: 0 0 4 SENT: ACK 0 - delayed 197 ms RECV: 1 1 4 SENT: ACK 1 - delayed 131 ms RECV: 0 2 4 SENT: ACK 0 - not sent RECV: 0 2 4 SENT: ACK 0 - delayed 270 ms RECV: 1 3 4 SENT: ACK 1 - delayed 145 ms vega> java AbrtSender antares 10005 4 SENT: 0 0 4 - timeout SENT: 0 0 4 - timeout SENT: 0 0 4 RECV: ACK 0 SENT: 1 1 4 RECV: ACK 1 SENT: 0 2 4 - timeout SENT: 0 2 4 RECV: ACK 0 SENT: 1 3 4 RECV: ACK 1 Example 5 I'm not giving the results here, but try this:
It should produce two premature timeouts in a row (on data 1 and the retransmission of data 1) by delaying the ACKs by 1000ms and 1266ms. Convince yourself that the operation of your program is correct. SubmissionYou must name your source files AbrtSender.java and AbrtReceiver.java (note the capitalization). Make sure that you submit all files necessary to compile your program. But, do not submit compiled files (.class files). Directions for submitting your assignment through Blackboard |