Manual

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 2

Programming Assignment 2
Maintaining file consistency in your Gnutella-style P2P system
CS550- Advanced Operating System
Harsh Singh (A20398109)
Manual:
a. Unzip the project file to a location [($ProjectFolder)]
b. Open 10 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. Type make peer_1 , make peer_2, make peer_3, make peer_4 , make peer_5, make
peer_6, make peer_7 , make peer_8, make peer_9 and make peer_10 in separate
terminals. If any error occurs saying '###ERROR: Can not host. Exiting...' then open file
[($ProjectFolder)/code/params.py] and change the port list.
e. Now assuming everything running smoothly. Peer terminal will prompt the user to enter the
Commands.
f. By default, PUSH is set. To change to PULL , open file [($ProjectFolder)/code/params.py], set
PUSH to False and redo steps b to d.
g. SEARCH command:
a. Enter “SEARCH” when prompt shows ”>>>”.
b. Enter File Name with extension when prompt shows ”>>>”.
c. Now, terminal will show the ports of peers holding the file.
d. Select using index of ports. Enter it when prompt shows ”>>>”.
e. Terminal will show the response accordingly.
e.g. steps g.a to g.e are shown in fig 1 and 2.
Figure 1 SEARCH command
Figure 2 Search Command
h. UPDATE command:
a. Enter “UPDATE” when prompt shows ”>>>”.
b. Terminal will show the response accordingly.
i. REFRESH command: (only available when PULL is set to False in params.py)
a. Enter “REFRESH” when prompt shows ”>>>”.
b. Enter File Name with extension when prompt shows ”>>>”.
c. Terminal will show the response accordingly.
j. To exit safely, use ctrl+z or multiple ctrl+c in all peer terminals
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 ports and shared directory in params.py

Navigation menu