Computer engineering program- Spring, 2017 Page 1 of 3 College of Engineering-Dept. of Computer Science and Engineering Computer engineering program Multimedia networks (CMPE-482) Assignment 2 Spring, 2017 Final mark: 10 Submission due: April 17th, 2012 midnight  Provide your report with a cover page containing your name, student number, and e-mail.  Include code test, and attach all output text and non-text files, if any, including screenshots, logs, etc.  Include all results with clear comments on each result into the report.  Submit all assignment materials in one archive file “Assignment 1-{student name}-{student no}.zip” to blackboard by the due date shown above. Introduction The objectives of this assignment are as follows: 1- To exercise your development skills to manipulate the two implementations for leaky bucket and token bucket traffic shaping mechanisms. 2- To conduct a performance comparison between leak and token bucket traffic shapers. Computer engineering program- Spring, 2017 Page 2 of 3 Tasks Figure 1 – Architecture of the Leak Bucket and TokenBucket traffic shapers 1. Extract the assignment 2.jar file into a java project and go through the code to familiarize yourself with all components, including: a. LeakyBucket java package, which contains a full implementation of Leak Bucket traffic shaper. b. TokenBucket java package, which contains a full implementation of Token Bucket traffic shaper. c. Sender class, which is used to send a single packet on port 4444 to be picked up by the traffic shaper in use. d. Receiver class, which is used to receive a single packet from port 4445, which is the output port of the traffic shaper in use. e. “Terse_Jurassic256.dat” data file which stores the packet length of individual packets generated by a video encoder for the movie jurassic park. The format of the file includes one integer number per line, which indicates the length of the packet generated by the video encoder. 2. Modify the Sender class to do the following: a. Read the numbers in the “[file name].dat” one by one (note: you will be provided with two files fixed_stream.data, and Terse_Jurassic256.dat. b. Generate a dummy packet every T millisecond (where T is a configurable parameter) with a length equal to the length of the packet read from the file. c. Send the packet on port 4444 to be picked up by the traffic shaper in use. d. Calculate the data rate of the video stream sent by calculating the number of bits for each one second time window. 3. Modify the receiver class to do the following: a. Receive the packets sent on port 4445 one by one. b. Calculate the data rate of the video stream received by calculating the number of bits for each one second time window. 4. Change the configuration of the LeakyBucket traffic shaper to be as follows: Computer engineering program- Spring, 2017 Page 3 of 3 a. Leaky Bucket maximum rate = 1 Mbps b. Leaky Bucket buffer length = 300000 bits 5. Change the configuration of the TokenBucket traffic shaper to be as follows: a. Token Bucket Maximum rate = 1 Mbps b. Token Bucket length = 300000 Warning: the source code of the program will be cross-checked for similarity. Test cases 1. (1 point) Run the LeakyBucket BlackBox class, the receiver, then the sender with T=60 milliseconds, and file name “fixed_stream.dat” and report the drawing of the data rates before and after the traffic shaper vs time (in milliseconds). Comment on the results. 2. (1 point) Repeat test case 1, using T = 40 milliseconds, same file name, report data rates before and after the traffic shaper. Comment on the results. 3. (1 point) Repeat test case 1, using T = 35 milliseconds, , same file name report data rates before and after the traffic shaper. Comment on the results. 4. (2 points) Run the TokenBucket BlackBox class instead of the LeakyBucket, Repeat test cases 1, and 3 and report the data rate for each case. Comment on the results of each case. 5. (5 points) Repeat test cases 1 to 4 for file name “Terse_Jurassic256.dat” with variable packet length.