Reference no: EM132512952
Assignment - Peer-to-Peer Content Distribution and Distributed Query
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, you can read the following academic article.
Rodrigues, R., Druschel, P., 2010. Peer-to-Peer Systems, Communications of the ACM. 53(10), 72- 82.
In this assignment, you are to develop a particular Peer-to-Peer (P2P) application - content distribution and distributed query. The application allows peers to form an overlay and share information on the entire peer 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 information stored in a peer can be shared by any other peers. When a peer (requester) queries a question, it multicasts a request including the question to the peer overlay. Any peers (repliers) that have an answer to the question will respond to the requester. To query a question, a UDP datagram via IP multicast is used.
Once the answer is found, replying the answer is to use another separate UDP communication between the requester and the replier. To complete this assignment, you need to complete the following 2 parts. In addition to multithreading and UDP packets, IP multicast must be used to form the peer overlay. Thus, you will need to review 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) before starting this assignment. Client/server model is also used for this assignment as a peer is a client and a server at the same time.
Part 1: Peer overlay design and implementation
In this part, you are to develop the simplified system of content distribution and distributed query. The assumptions on the system are specified as follows.
1. Each peer has a unique ID.
2. Peers form a networking overlay by IP multicast.
3. Each peer has a number of answers to some questions that can be shared by other peers.
4. Once a peer has a question, it needs to compose a request, including the question and communication information such as the reply IP address and port number.
5. Each peer can multicast a query request to all other peers in the overlay. After that, the peer is waiting on the reply port for answers.
6. To simplify the problem, we assume that the answer to a query question can always be found from at least one peer.
7. Once the answer to the question is found, the replier peer (the one who has the answer) will use a UDP datagram to send the answer to the requester peer (the one who asks the question).
8. A peer needs to ignore the requests from itself because by default IP multicast sends a message to every peer on the overlay.
Part 2: Documentation
On completion of 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. Description of key potential problems with IP multicast.
Attachment:- Assignment File - Peer-to-Peer Content Distribution and Distributed Query.rar