Brief description
Looking at the Diagram(interface) we can see how actaully the senario looks before the server authorizes any of the client.We don't have any idea whether a client is a seed/peer. Only after pinging to server and the confirmation of the ID we come to know the Client.
Basic assumption of thr project.
Activity Diagram:
Algorithm:
//sever is polling a port waiting for request
1:Client pings to server.
// server greets and response
2:what is your Client ID?
// client response
3:client provides client ID (SEED143 , PEER987)
//now the server knows what this clients wanna do
4:if its SEED it askes SEED to uplaod its index
else if its PEER go to step 6
5:Server prepares a master index.
6:PEER's is asked to enter the sipmle query for search.
7:server searches the queries
8:if search is successful route the peer to seed (bind the two clients)
else go to step
9:PEER is asked if it wants to search once again
if YES go to step 7
else if NO go to step
10:Display Termination Message and EXIT
Simulation Snapshots: