This project has two purposes: first to make you familiarize with sockets/RPCS/RMIs, processes, threads; second to...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
This project has two purposes: first to make you familiarize with sockets/RPCS/RMIs, processes, threads; second to learn the design and internals of a peer-to-peer (P2P) file sharing system. You can be creative with this project. You are free to use any programming languages (e.g., C/ C++ or Java) and any abstractions such as sockets, RPCs, RMIs, threads, events, etc. that might be needed. Also, you are free to use any machines such as your laptops or PCs. In this project, you need to design a simple P2P system that has two components: 1. A central indexing server. This server indexes the contents of all of the peers that register with it. It also provides search facility to peers. In our simple version, you don't need to implement sophisticated searching algorithms; an exact match will be fine. Minimally, the server should provide the following interface to the peer clients: o registry(peer id, file name, ...) -- invoked by a peer to register all its files with the indexing server. The server then builds the index for the peer. Other sophisticated algorithms such as automatic indexing are not required, but feel free to do whatever is reasonable. You may provide optional information to the server to make it more 'real', such as the clients' bandwidth, etc. 。 search(file name) -- this procedure should search the index and return all the matching peers to the requestor. 。 deregister(peer id, file name) -- invoked by a peer to delete a file registry in the indexing server. After a peer registered all its files with the indexing server with registry function, the peer can use deregister function to let index server delete the corresponding index for this file. 2. A peer. A peer is both a client and a server. As a client, the user specifies a file name with the indexing server using "search". The indexing server returns a list of all other peers that hold the file. The user can pick one such peer and the client then connects to this peer and downloads the file. As a server, the peer waits for requests from other peers and sends the A requested file when receiving a request. Minimally, the peer server should provi following interface to the peer client: o retrieve(file name) -- invoked by a peer to download a file from another peer. 2/3 Other requirements: . Both the indexing server and a peer server should be able to accept multiple client requests at the same time. This could be easily done using threads. Be aware of the thread synchronizing issues to avoid inconsistency or deadlock in your system. No GUIs are required. Simple command line interfaces are fine. Each peer should have an automatic update mechanism. If a user modifies or deletes some files registered at a server, the effect should be reflected to the server in time. For example, if a user deletes a file on the disk, the server should be notified in time and also remove the corresponding item from the index server. This project has two purposes: first to make you familiarize with sockets/RPCS/RMIs, processes, threads; second to learn the design and internals of a peer-to-peer (P2P) file sharing system. You can be creative with this project. You are free to use any programming languages (e.g., C/ C++ or Java) and any abstractions such as sockets, RPCs, RMIs, threads, events, etc. that might be needed. Also, you are free to use any machines such as your laptops or PCs. In this project, you need to design a simple P2P system that has two components: 1. A central indexing server. This server indexes the contents of all of the peers that register with it. It also provides search facility to peers. In our simple version, you don't need to implement sophisticated searching algorithms; an exact match will be fine. Minimally, the server should provide the following interface to the peer clients: o registry(peer id, file name, ...) -- invoked by a peer to register all its files with the indexing server. The server then builds the index for the peer. Other sophisticated algorithms such as automatic indexing are not required, but feel free to do whatever is reasonable. You may provide optional information to the server to make it more 'real', such as the clients' bandwidth, etc. 。 search(file name) -- this procedure should search the index and return all the matching peers to the requestor. 。 deregister(peer id, file name) -- invoked by a peer to delete a file registry in the indexing server. After a peer registered all its files with the indexing server with registry function, the peer can use deregister function to let index server delete the corresponding index for this file. 2. A peer. A peer is both a client and a server. As a client, the user specifies a file name with the indexing server using "search". The indexing server returns a list of all other peers that hold the file. The user can pick one such peer and the client then connects to this peer and downloads the file. As a server, the peer waits for requests from other peers and sends the A requested file when receiving a request. Minimally, the peer server should provi following interface to the peer client: o retrieve(file name) -- invoked by a peer to download a file from another peer. 2/3 Other requirements: . Both the indexing server and a peer server should be able to accept multiple client requests at the same time. This could be easily done using threads. Be aware of the thread synchronizing issues to avoid inconsistency or deadlock in your system. No GUIs are required. Simple command line interfaces are fine. Each peer should have an automatic update mechanism. If a user modifies or deletes some files registered at a server, the effect should be reflected to the server in time. For example, if a user deletes a file on the disk, the server should be notified in time and also remove the corresponding item from the index server.
Expert Answer:
Answer rating: 100% (QA)
P2P File Sharing System Design This project will implement a simple peertopeer file sharing system with a central indexing server and multiple peers Heres a breakdown of the design Components Central ... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
THIRD AVENUE SOFTWARE HEALTH-CARE APP PROJECT This case is new for the ninth edition of Information Technology Project Management . The case provides an opportunity to apply agile and Scrum...
-
A fruit vendor professes to sell fruits at the cost price, but uses false weights. He gains 40% in this manner. What weight does he substitute for one kilogram?
-
Assume that Luxury Limousines completed the following transactions: 2013 Jan. 5 Paid $40,000 cash for a used limousine. 6 Paid $4,000 to have the engine overhauled. 9 Paid $1,500 to have the company...
-
A typical solution of baking soda (sodium bicarbonate, NaHCO 3 ) has a pH that is independent of concentration. The pH of a solution of sodium bisulfate (NaHSO 4 ) does depend on the concentration....
-
Choose a country from three of the regions presented in Table 6.7. Using the Internet, collect as much information as you believe is needed to identify the potential for market segments based on age,...
-
Compute FIFO, LIFO, Average Cost?Periodic Presented below is information related to radios for the Couples Company for the month of July. (a) Assuming that the periodic inventory method is used,...
-
A single nuclear reactor produces 2.6GW of electrical power, and has a generator voltage of 22kV.What percentage of power would be lost from our nuclear reactor in three-line transmission that goes...
-
In 20X2, the new CEO of Watsontown Electric Supply became concerned about the companys apparently deteriorating financial position. Wishing to make certain that the grim monthly reports he was...
-
A 5.00 mL sample of brandy was diluted to 1.000 L in a volumetric flask. The ethanol, C 2 H 5 OH, in a 25.00 mL aliquot of the diluted solution was distilled into 50.00 mL of 0.02 M K 2 Cr 2 O 7 and...
-
The balance sheet, Income statement and statement of change in equity have been required statements for years, for investors and stakeholders to establish going concern, probability and growth but...
-
The objective of this portion of the assignment is to help you develop your financial planning skills by creating two SMART financial goals. Using the SMART Goal Guidelines, create TWO SMART goals....
-
Pierre works at Winners and as an employee he is given the ability to buy a suit for $100 when regular customers would pay $500 for the same suit. Winners cost for the suit is $150. Does Pierre have...
-
A tax planning activity for February would be to check to see if you have received all of your W-2 forms (salary and wages) and all of your forms (interest and dividends) so you can begin to organize...
-
1. What are the basic differences between insurance premiums and taxes as sources of medical care financing? 2. Why is obesity such a problem in so many countries worldwide? 3. Why is it so difficult...
-
A sphere of radius a and dielectric constant e, has a point charge Q at its center Dielectric constant outside of the sphere is 1. (i) Find electric field inside and outside of the sphere. (ii) Find...
-
Find the reduced echelon form of each of the matrices given in Problems 120. c 1 26 + 4
-
Sherry rents her vacation home for 6 months and lives in it for 6 months during the year. Her gross rental income during the year is $4,000. Total real estate taxes for the home are $950, and...
-
Sally and Charles Heck received the following dividends and interest during 2012: Assuming the Hecks file a joint tax return, complete Schedule B of Form 1040 (on page 2-33) for them for the 2012 tax...
-
William sold Section 1245 property for $25,000 in 2012. The property cost $35,000 when it was purchased 5 years ago. The depreciation claimed on the property was $16,000. a. Calculate the adjusted...
-
For the particular case of hard spheres, the pressure in the virial equation of state is determined by evaluating the pair correlation function at contact. Write the pair correlation function as...
-
Use a virial expansion approach to determine the first few nontrivial order contributions to the pair correlation function \(g(r)\) in \(d\) dimensions. Show that the pair correlation function is of...
-
(a) For a dilute gas, the pair correlation function \(g(r)\) may be approximated as \[g(r) \simeq \exp \{-u(r) / k T\}\] Show that, under this approximation, the virial equation of state (10.7.11)...
Study smarter with the SolutionInn App