1. Homepage
  2. Programming
  3. CS260 Programming Assignment 3: UDP File Sharing

CS260 Programming Assignment 3: UDP File Sharing

Engage in a Conversation
CC++UDPUDP File SharingCS260Computer Networks IUSDigiPen Institute of Technology

CS260 Programming Assignment 3

For this assignment, you will implement file sharing over UDP. CourseNana.COM

1 Programming statement: UDP File Sharing.

1.1 Specifications

  1. You will have a client program and a server program. Clients will be able to connect to the server via TCP. When connected, clients should be able to specify what files they are sharing somehow. As a client, I can type something like “show” and the server will show me every file that I can potentially download. CourseNana.COM

  2. The list of files on the server should be a combination of the lists of files that each client advertises that it has. Assume that there are no duplicate file names (i.e. don’t bother checking for or handling duplicate file names on different clients). Each time a new client connects, it should tell the server what files it is sharing and the server should add those to the master list of all available files. CourseNana.COM

  3. Any client may request to download any file. When this occurs, the server should notify the client that owns the file to be downloaded that someone wants to download that file. The server should then somehow indicate to the client that is trying to download the file the IP and Port of the client that has the file. For example, let’s say that host A has a file called “file.txt” and host B wants a copy of “file.txt”. Host B will type something like “get file.txt” to the server. The server will notify Host A that Host B wants a copy of “file.txt” and will inform Host A what Host B’s IP address and port are and will inform Host B what Host A’s IP address and port are, that way both A and B will know where to send their data. The server will then tell host A to start sending the file, and Host A will send “file.txt” directly to Host B using a UDP socket. CourseNana.COM

  4. If the server crashes while a file transfer is in progress, that file transfer should still be able to complete successfully, however no additional transfers will be possible. CourseNana.COM

  5. If a client disconnects, the server should ensure that it updates its list of files so that the disconnected client’s files are no longer shown as available for download. CourseNana.COM

  6. For this assignment, use a config file of the following format: serverIP serverPort clientUDPport directoryToStoreReceivedFiles directoryToShareFilesFrom slidingwindowsize packetlossrate the client UDP port is the port that a UDP socket that can accept files is listening on, the other settings should be self-explanatory. CourseNana.COM

  7. All files must transfer correctly to receive full credit. Assume that I will not attempt to send a file larger than 1GB and that the computer receiving the file will always have enough hard drive space to store it. CourseNana.COM

  8. The program does not need to transfer files at full speed over ethernet; it should be able to send files at a reasonable speed. Sending a 10MB file in about a minute is reasonable. Sending a 10MB file in 5 minutes is not reasonable. Also, assume that at any given time, I will not attempt to transfer multiple files between the same clients e.g. I will not try to transfer a file from Host A to host B while transferring another file from Host A to Host C at the same time (see extra credit). CourseNana.COM

  9. To ensure a reliable data transfer over UDP, you should implement a pipeline scheme Selective Acknowledgement to control the sliding window. The maximum packet size should not exceed MTU size over Ethernet (i.e. 1500 byte). You should also simulate a random packet loss (e.g. packet loss rate is 1%) on both sender and receiver side to see the effect of packet loss. It is helpful when you turn on the logging mode, the retransmission information (e.g. Packet sequence number, the size of the packet) can be kept track of. CourseNana.COM

1.2 Rubrics

The whole assignment will be scored upon a total of 100 points. The breakdown of the scoring are as follows: CourseNana.COM

  1. Your project/directories have been submitted according to the proper submission conventions as stipulated in the syllabus. This is worth 5 points.
  2. A proper README file that indicates the format of the either the configuration file or the arguments that the program takes in. If you are working in pairs, please indicate your partner clearly in the README file too. Also, write out the division of labour between the two of you in the README file. This is worth 5 points.
  3. Your code should be properly commented with appropriate naming of the variable names. On top of that, you should demonstrate a re-use of code from assignment 2 if possible. This is worth 10 points. You will only get the full 10 points if you have code re-use. Otherwise, you can only get a maximum of 7 points out of these 10 points. Document your re-usage in README briefly.
  4. Your program should be able to list files consistently. So say that now Client A and B are currently logged on. On Client A, I should be able to view the list of files shared by Client B and vice versa. But now Client C joined the network while Client B disconnects. The list of files shared by Client B should not be viewable now. This is worth 15 points.
  5. Your program should be able to support the transfer of files between hosts of more than 2. Say if we have three clients A, B and C logged on. We should be able to transfer a file from A to B, then from B to C and finally from C to A. For testing of this stage, we would transfer files of a relative smaller size, say 10MB. The client programs and server program should not crash in anyway during the transfers. Any program crashes or incorrect transfer of files for this will result in deduction of points. This is worth 15 points.
  6. While client A is downloading a file from client B, should the server crash halfway through (e.g., shut down suddenly), the download should still succeed. This is worth 10 points.
  7. Show the total number of packets sent and received during file transfer for the simulation of packet loss (packet loss rate is given in the configuration file). Failing to implement this result in maximum marks of 30.
  8. Show that you have implemented a pipeline scheme to ensure reliable data transfer. Use the parameter defined in the configuration file. Failing to implement this result in maximum marks of 30.
  9. Stress test of transferring large files. We shall test the transfer of binary files of size 10MB and 100MBbetween two clients. All transfers should be correct. On the LAN in school, the transfer should happen in a reasonably fast speed too. For example, the 100MB file transfer should be completed within 2 minutes time. This is worth 30 points.
  10. Your program should support logging mode where the client and server keep track of the sliding window size and packet sequence number/Acknowledgement sequence number as well the timing when Acknowledgement is sent and received. This is used to demostrate that you are really implementing Selective Acknowledgement. This worth 10 points.
  11. If your program does not support Selective Acknowledgement for sliding window control, maximum 50 points will be awarded.

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
C代写,C++代写,UDP代写,UDP File Sharing代写,CS260代写,Computer Networks I代写,US代写,DigiPen Institute of Technology代写,C代编,C++代编,UDP代编,UDP File Sharing代编,CS260代编,Computer Networks I代编,US代编,DigiPen Institute of Technology代编,C代考,C++代考,UDP代考,UDP File Sharing代考,CS260代考,Computer Networks I代考,US代考,DigiPen Institute of Technology代考,Chelp,C++help,UDPhelp,UDP File Sharinghelp,CS260help,Computer Networks Ihelp,UShelp,DigiPen Institute of Technologyhelp,C作业代写,C++作业代写,UDP作业代写,UDP File Sharing作业代写,CS260作业代写,Computer Networks I作业代写,US作业代写,DigiPen Institute of Technology作业代写,C编程代写,C++编程代写,UDP编程代写,UDP File Sharing编程代写,CS260编程代写,Computer Networks I编程代写,US编程代写,DigiPen Institute of Technology编程代写,Cprogramming help,C++programming help,UDPprogramming help,UDP File Sharingprogramming help,CS260programming help,Computer Networks Iprogramming help,USprogramming help,DigiPen Institute of Technologyprogramming help,Cassignment help,C++assignment help,UDPassignment help,UDP File Sharingassignment help,CS260assignment help,Computer Networks Iassignment help,USassignment help,DigiPen Institute of Technologyassignment help,Csolution,C++solution,UDPsolution,UDP File Sharingsolution,CS260solution,Computer Networks Isolution,USsolution,DigiPen Institute of Technologysolution,