Recent Question/Assignment

COIT20257 Assignment 2 Specification and Marking Criteria
Due date: Friday of Week 10 (25th September 2020) 11.55 pm AEST
ASSESSMENT Weighting: 35%
Length: NA 2
• Design and develop distributed applications using one of the approaches of distributed objects, web services, and peer-to-peer solutions
• Solve problems in the distributed systems domain by applying the principles of distributed systems to authentic problems
• Critique the issues involved in developing reliable, secure, and scalable distributed systems
• Work independently and collaboratively in small teams.
Assignment Title: Peer-to-Peer Overlay and File Sharing
The application background
In distributed computing, a peer is both a client and a server at the same time, being able to request services from other peers or providing services to other peers. For the general knowledge about Peer-to-Peer (P2P) systems, you can read the following academic article.
Rodrigues, R., Druschel, P., 2010. Peer-to-Peer Systems, Communications of the ACM. 53(10), 7282. (available at on 24th April Dec 2020).
In this assignment, you are to develop a P2P application - Peer-to-Peer Overlay and File Sharing. Among many P2P applications, file sharing is a typical application to share available files across all peers of an overlay. In this assignment, you will need to upgrade a client and a server into a peer. The peers are to form an overlay by IP multicast and the files of a peer can be shared by any other peers. When a peer needs a file, it will multicast the file name to the peer overlay and the peer that has the file will upload the file to the requester peer. To search for a file, a UDP datagram via IP multicast is used. Once the file is found, upload/download of the file is to use TCP streaming to fit for any possible type and length of the file. To complete this assignment, you need to complete the following two parts.
Part 1: Peer overlay design and implementation
In this part, you are to develop the simplified P2P file sharing system. The assumptions on the system are specified as follows.
1. Peers form a networking overlay by IP multicast (reference to Chapter 4.4 of the textbook, Week 5 lecture slides, Week 6 lab projects, and search for other academic articles about IP multicast if necessary).
2. Each peer has a unique ID.
3. Each peer has a number of files that can be shared by other peers.
4. Each peer can multicast a file sharing request to all other peers in the overlay. To simplify the problem, we assume that if the request file exists on the overlay, it can be found from a single peer.
5. Once the file is found, the requester peer (the one who requests the file) will download the file from the supplier peer (the one who possesses the file).
6. The shared files can be in any type and any length.
7. A peer needs to ignore the requests from itself because by default IP multicast sends a message to every peer on the overlay.
The following screenshots show an implementation of the above file sharing system.
1. The 3 peers (with ID of PPP1, PPP2 and PPP3) join the same IP multicast group. Note: and 8888 are the IP multicast address and port number that are used in this example. The reception port is the TCP port that the peer is to receive/download the request file. Clicking the ‘Set’ button is to set these arguments for the peer.
2. At the beginning, PPP1 has the file IPDPS2017.pdf, PPP2 has the file CloudComputing.jpg and PPP3 has the file OneMoreNight.mp3.
3. PPP1 requests CloudComputing.jpg, which is found in PPP2 and then downloaded from PPP2 into PPP1.
4. PPP2 requests OneMoreNight.mp3, which is found in PPP3 and then downloaded from PPP3 into PPP2.
5. PPP3 requests IPDPS2017.pdf, which is found in PPP1 and then downloaded from PPP1 into PPP3.
Note: you will need to check that the original file and the downloaded file are exactly the same. For example to open IPDPS2017.pdf of PPP1 and Download-IPDPS2017.pdf of PPP3, you will ensure the two files are the same without any corruption in the file transfer.
The original file:
The downloaded file:
If a file cannot be found on the overlay for a certain period of time, the user should get a confirmation message. For example, PPP1 requests file ABC, which cannot be found.
The above example shows the equity between peers, that is, every peer is both a client and a server to share files. Your implementation must satisfy all the above requirements in order to get full marks.
Part 2: Documentation
After the implementation of the framework, prepare a document to include:
1. An end user’ instruction about how to compile, run and test your system.
2. The key issues about upgrading a client and a server to a peer and overlay forming. Submission
You need to provide the following files in your submission.
1. At least 3 peers in 3 individual folders, of which each folder contains:
• Files of Java source code of the implementation. The inline comments on the data structure and program structure in the programs are required. These source code files must be able to be compiled by the standard JDK (Java Development Kit) or NetBeans IDE from Oracle (
• The compiled Java class files of the source code. These Java classes must be runnable on the standard JRE (Java Runtime Environment) or NetBeans IDE from Oracle
• Each peer has at least 1 file for file sharing test.
2. A Microsoft Word document to address the issues as specified in Part 2 above.
All the required files must be compressed into a zip file for submission. You must submit your assignment via the online submission system from the unit Moodle site. Any hardcopy or email submission will not be accepted. After the marked assignments are returned, any late submissions will not be accepted. The Marking Criteria
Marking Criteria Available Marks
Part 1: Peer overlay design and implementation 29
1. Correct implementation of peers for enabling both client and server functionality 2
2. Peers are well structured by following Java client/server programming paradigm 2
3. Correct implementation of the peer overlay in terms of two communication channels, one for multicast and the other for file transfer 2
4. Correct implementation of peers for creating and joining an IP multicast group 2
5. Correct implementation of peers for enabling multicasting a file sharing request by using a UDP datagram 2
6. Correct implementation of a multicast request to encapsulate a peer’s ID, a TCP port and a file name 3
7. The multicast request from a peer itself should be ignored by the peer 2
8. Support of any type of file transfer between peers 3
9. A service thread is enabled by a peer when concurrency is available 2
10. The application is compilable and runnable 2
11. Provision of 3 test peers and their share files in the assignment submission 3
12. ‘File cannot be found’ can be confirmed in a certain period of time if there is no such a file on the overlay 2
13. The readability of source code and the provision of necessary inline comments 2
Part 2: Documentation 6
1. The user instruction on compiling and starting of the application 2
2. The user instruction for the test of file sharing 2
3. Addressing the key issues about upgrading a client and a server to a peer and peer overlay forming 2
Sub Total for Assignment 2 35
Late Penalty -1.75 (5% each calendar day, either full or part)
Plagiarism Penalty
Total for Assignment 2

Looking for answers ?