Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.30 KB | None | 0 0
  1. Programming Project #1
  2. Sliding Window Algorithm
  3.  
  4. Your task in this programming project is to write a sliding window program that can tolerate delays, dropped packets, out-of-order delivery and the "otherwise unexpected" packet. The server and client will perform a file transfer using the sliding window algorithm and UDP packets over networks that may drop, delay, reorder, or otherwise mangle your packets.
  5.  
  6. Specifications:
  7.  
  8. * Programs are to use UDP packets for all communication.
  9. * Your program is to have two components: a sender and a receiver. The context is determined by command-line argument "-s" or "-r", respectively, specified as an option to your program at runtime. That is to say, to run your code as a server, you would provide the option "-s" to the program's command-line arguments; the receiver would be provided the option "-r" to the command-line argument.
  10. * The server is to take a filename as a command-line argument. The filename should refer to an existing file with sufficient privileges for the server to read the contents. The filename is specified through the command-line argument "-i [filename]". The syntax "[foo]" indicates a mandatory field. File permissions should be validated as part of the initialization and setup of your code.
  11. * JUST ADDED: The server will need to take an argument for the host of the receiver. Use "-T [targethost]" for this option. Targethost refers to the hostname where the receive part of your program is running.
  12. * The receiver is also to take a filename as a command-line argument. The filename should refer to the name of a file that the program would have sufficient permissions to write to, or to create and to write to if the file does not already exist. The filename is to be specified through the command-line argument "-o [filename]". File permissions should be validated as part of the initialization and setup of your code.
  13. * The server is to take the sending window size as a command-line parameter. The sending window size is to be specified through the command-line argument "-w [number]".
  14. * The receiver is to take the receive window size as a command-line parameter. The receive window size is to be specified through the command-line argument "-w [number]".
  15. * An optional parameter for the default timeout value for the sender (Note: recently corrected! It used to say "receiver.") may be specified on the command-line using the argument "-t [milliseconds]". In the absence of a default timeout value, your program is required to initialize the default timeout to a reasonable value.
  16. * An optional parameter for the default payload size for the sender may be specified on the command-line using the argument "-m [bytes]". In the absence of a default payload size command-line parameter, your program is required to initialize the default payload size to a reasonable value.
  17. * Your receiver is required to buffer out-of-order packets that fall within the receive window. Packets content may also be trimmed (so that the contents aren't completely delivered in the packet) or appended to (so that there is cruft in the end of the packet). Packets are otherwise unaltered at the IP datagram level.
  18. * Your server will be required to do all that is necessary to deliver the specified file without error. This includes retransmission of dropped or corrupt packets until all of the contents of the file have been received and validated by the receiver.
  19. * Your program must have a usage statement that describes all of the options available and describes their functionality.
  20.  
  21. Logistics
  22.  
  23. * The port that you will use to carry out the client-server paradigm is given by:
  24. ([Your student ID number] % 512) + 4000
  25. Ex: if your student number is 444313, your port would be
  26. (444313 % 512) + 4000 = 409 + 4000 = 4409
  27. * You will be using three (or more) systems to test your code's capabilities:
  28. o student.cs.uni.edu
  29. o octane.cs.uni.edu
  30. o dragon.cs.uni.edu
  31. * UDP packets in the range 4000-4511 will be randomly dropped between student and octane.
  32. * UDP packets in the range 4000-4511 will be randomly delayed between student and dragon.
  33. * UDP packets in the range 4000-4511 will be randomly delayed, dropped, duplicated, and possibly otherwise mangled between dragon and octane.
  34. * UDP packets outside of this range will not be externally manipulated
  35. * dragon.cs.uni.edu and octane.cs.uni.edu will share a common filesystem (so don't specify the same output file as your input file).
  36.  
  37. Submission
  38.  
  39. * Submit your source code
  40. * Submit a description of your implementation of the sliding window algorithm. This must include any strategies that you used to designate offsets, acks, sequence numbers, etc.
  41. * Submit two "script" sessions, showing your server and receiver working in concert to transfer a file.
  42.  
  43. * These components are to be combined and submitted as a single file in tar or zip format. Compressed tar files (bzip, gz, or zip) are acceptable. Do not submit 7zip or rar.
  44. * Submit your archive using the upload link below by Friday, 12 November 2010, 11:55 PM.
  45.  
  46. Caveats:
  47.  
  48. * Late submissions will not be graded
  49. * Submissions that circumvent the upload process below (e.g., by e-mail) will not be graded
  50. * Submissions that don't compile will not be graded
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement