Manual
User Manual:
Open the PDF directly: View PDF
.
Page Count: 1
Napster Style Peer to Peer File Sharing System
CS550 – Advanced Operating System
Harsh Singh (A20398109)
Manual:
a. Unzip the project file to a location [($ProjectFolder)]
b. Open 4 terminals and navigate them to [($ProjectFolder)/Code]
c. If python 3.0+ is not installed in the system (to check write python3 into the terminal), run make get-dev
in one of the terminal.
d. Now, run make server. If terminal prompts “->Server cannot start. Please check port.” and exits, open file
[($ProjectFolder)/Code/params.py] and change
serv_port=5015 to serv_port=<some number between 1000-10000>
e. After that run make peer_1 , make peer_2 and make peer_3 in separate terminals. If any error occurs
saying “->Upload server could not start. Exiting.” then open file [($ProjectFolder)/Code/params.py] and
change the port
peer_i_port. To serv_port=<some number between 1000-10000 not in the params.py file>
here “i” is 1,2 or 3 according to error generator make peer_i .
f. Now assuming everything running smoothly, Server console will show all the events. Peer terminal will
prompt the user to enter the file name. All file in shared folder of each connected peer will get sync with
the server (only the file name not whole file).
g. User first need to give the file name and then select the peer if any of them have the file.
h. To exit safely, use ctrl+c in all peer terminals and then ctrl+c in server terminal
Note:
1. [($ProjectFolder)/Code/params.py] file contains all the ports and shared directory list, make sure no
ports are same.
2. If more client needs to be added then, add more pairs of port and shared directory in params.py and
make another copy of any peer_x file (x=1,2 or 3). Make sure to change in peer_x namely,
shared_dirPath
portP
both are available at the top of the file [($ProjectFolder)/Code/peer_x.py]