290 likes | 408 Views
I nfo S hare A Distributed P2P Information Storage & Retrieval System. Kaustubh Supekar Ravi Khemani Sreeparvathy Pillai. Basic P2P Model (RECAP). P2P is Peer-to-Peer. Sharing of computer resources and services by direct exchange between systems.
E N D
InfoShare A Distributed P2P Information Storage & Retrieval System Kaustubh Supekar Ravi Khemani Sreeparvathy Pillai
Basic P2P Model (RECAP) • P2P is Peer-to-Peer. • Sharing of computer resources and services by direct exchange between systems. • Resources including the exchange of information, processing cycles, cache storage, and disk storage for files. • Nodes work in collaboration and send request messages to other nodes in the network for sharing of information. • Each node/peer has symmetric roles (requesting, serving, downloading, routing) throughout system: servent= server + client
Basic P2P Model (cont) • Search requests in the network is always propagated to the most likely location of data. • The file/data is cached in the intermediate peers on the reply path back to the source. • Anonymity provided - The actual requester does not have knowledge on where the information is actually located. • Current running examples of P2P are Napster, Gnutella, FreeNet, JXTA.
Scope of the project • Basic Peer-to-Peer communication model • Fast retrieval of information from multiple peers Use of faststream algorithm • Intelligent peers Nodes would sniff search packets they receive and attempt to automatically pre-fetch and cache portions of file commonly searched for • Anonymity Receiver would be unaware about the information source
Node C Node D Node A Our P2P model 1) Node A asks Node B for data. 3) B forwards the request to its neighbors. Node A Node B 4) These return any match- ing info. 6) B returns matching info 5) B looks up source of request. 2) B keeps a record that A initiated the request
Operations • Join A Join operation is performed when a peer wishes to enter the network. It identifies itself as a peer and determines its neighbors by sending multicast messages. • Leave Informs neighbors that it is leaving the network. The neighbor nodes also removes the peer from their respective neighbor list.
Operations (cont) • Upload Information Adds files to the shareable list for other peers in the P2P network to view. Internal operation; no messages are sent out by the peer in the network. • Retrieve Information A node asks for a particular file from one of its neighbors. Every peer searches the file in the local datastore and cache. If found then replies “I have the file” to the requester. If not found then it prepares another request message for the same file and forwards the search query to one of its neighbors where the file is most likely located.
ISRP 0 7 8 15 16 31
ISRP (cont) - Flags 7 6 5 4 3 2 1 0 Bits Interpretation 0-3 Reply codes 4-6 Reserved for future use 7 Full Retrieval / Distributed Retrieval Some reply codes: 0 – Successful; 1- Invalid Opcode; 2 – Version not supported; 3 – Option not supported; 4 – Hop to live exceeded; 5 – Invalid Destination address.
A “Who is my neighbor” Node A wishes to enter the network Message Exchange Zero nodes in the network
B “I am your neighbor” “Who is my neighbor” Node B also wishes to enter the network Message Exchange (cont) Node A is the only node in the network A
C D “You are my neighbor” Nodes C & D also enter the network and assume to make B as their neighbor Message Exchange (cont) Nodes A & B are in the network and are neighbors of each other B A
ISRP_QUERY ISRP_QUERY ISRP_QUERY Local Cache Local Cache Forward Forward Message Exchange (cont) Nodes A, B, C & D form the P2P network C B A D Node A needs a file “A.txt”
DataStore OBJECT GETOBJECT ISRP_HIT DataStore ISRP_MISS Node C contains the requested file Cache Node C sends the file to Node B Message Exchange (cont) Node B has sent the query to Nodes C & D C B A D
ISRP_HIT ISRP_GETOBJECT ISRP_OBJECT Tag Message Node B sends the file back to the originator of request i.e. Node A Message Exchange (cont) Node B gets the file from Node C and looks for the next node in the reply path C A B D
“I am Leaving” Neighbors Node C wishes to leave the network Message Exchange (cont) C A B D
Component Diagram Messaging Unit Incoming Message Handler Processing Unit Multicast Manager Neighbor Manager DataStore Manager Router Cache Manager DB Manager DataBase DataBase
Elements of system • Processing Unit Central component and handles communication between the other components. • Messaging Unit Handles sending and receiving of messages between peers. • Multicast Manager Manages sending and receiving of multicast messages in the group. • Neighbor Manager Contains methods for maintaining the neighbor list of the peer. • Incoming Message Handler Looks up in the Message queue for the next receiver of the reply. Helps in backtracking the reply to the original requester.
Elements of system (cont) • Router Looks in its routing table and makes decision along which path is the information most likely located and to which node it has to forward the request. Also contains functions on adding, deleting and updating entries in the routing table. • DataStore Manager Embeds functions on adding, removing and updating entries in the Local DataStore files list. • Cache Manager Embeds functions on adding, removing and updating entries in the Cached files list. • DB Manager Maintains the only interface to the database. • DataBase Tables created are Local DataStore files list, Cache files list, Neighbors list, Forwarding/Routing table, Message Tag.
User Interfaces Entry Level screen
User Interfaces (cont) Configure the application
User Interfaces (cont) Upload files
User Interfaces (cont) Search a File in the network
User Interfaces (cont) Status screen
Tools / Technology Used • Java Message Service (JMS) • Java 2 Enterprise Edition (J2EE) • Java Naming and Directory Interface (JNDI) • JBuilder x.0 • Microsoft Access