http://matrix.netsoc.tcd.ie/~neo/4ba2/p2p/
“Litmus test” for peer-to-peer systems:
Napster
· Client-server architecture.
· The shard file itself never passes through the Napster server.
· Server—holds a searchable index that contains entries of files (mp3s) that all the currently connected clients contain
· Clients—index and associate meta-data with shared files (mp3s) on their own machine. This information is then sent to Napster servers when connecting.
Process:
1. Client connects to Napster server, thereby sending the server its client-index and the data associated with its shared files.
2. Client sends a query to the Napster server.
3. Server searches its internal indices of currently shared files and returns results that match. The results contain meta-data about the file, the location of the file, and the speed of the clients that are sharing the files.
4. Client chooses to download one of the returned files, then connects directly to the other client sharing the file and begins the download.
· Utilizes the “dark matter of the Internet”---idle home PCs
· NO peer-to-peer/client-to-client connections at all. BUT clients aren’t simply “dumb browsers.” The are taking an active role in the functioning of the network…without them, the network wouldn’t work at all.
· Servers hold (large amounts) of data that needs to be analyzed. They chunk the data up into small packets that can be downloaded by the clients and analyzed, then the results uploaded and verified.
· Clients have little functionality—ability to do calculations on data provided and ability to communicate with servers.
Freenet
· Focuses on anonymity and freedom from any type of control
· Small user base b/c it is difficult to find resources you are looking for.
· No central servers
· All computations and interactions happen between clients
· All connections to the network are equal
· Clients connecting to Freenet connect randomly to any clients available making an unorganized scattered topology.
Process:
1. Send a request to a client you are connected to, who in turn sends it on to another client they are connected to and so on.
2. A client receiving a packet does not know the originator (who sent the packet---it’s not necessarily the person who handed him the packet)
3. Insert a resource into the network
a. Resource is given a descriptive title identifier that is hashed to generate a unique key to identify the resource
b. Resource is associated with that key and stored locally
c. Insertion might also be made in which the resource-key pair is sent to other nodes to store.
i. “Where” (or, in what “direction”) this packet will travel is based on how close the key is to other keys another node is storing.
ii. Thus, data with keys that are close reside close to each other in the network.
d. Searching and Retrieval (same process)
i. Knowing the title, hash it to get a key
ii. Based on key, send it to the most likely place to have the resource (based on “key closeness”).
iii. When key/resource is found, search ends and the node with the resource sends the resource back along the search route to the node who requested it.
iv. All clients along the way cache the passing data (replication of popular resources AND anonymity—no client used in the resource retrieval knows if the resource it is downloading and passing on is coming from the original publisher or going to the original requester, or just a link in the chain)
· Completely decentralized and distributed
· All connections on the network are equal
· Client connects, runs through a list of nodes that are most likely to be up or take a list from a website and then connect to how ever many nodes they want---random, unstructured network topology
Process:
1. Routing through broadcasting
a. Create a keyword string that describes the file you want and broadcast the string to all your connected neighbors
b. Search request arrives at a client, client searches itself for the file and broadcasts the request to all its other connections
2. On a query match, clients create a packet that contains info on how to locate and the file (a URL). All the clients send the query replies back along the path that it came.
3. Download—direct connection to client with the file and sends an HTTP packet requesting the file. Client with file replies with a standard HTTP response. (No anonymity)
· 2-tier system
o Fast connections to the network (SuperNodes)
o Slower connections (Nodes)
· When connect to a network, client decides if you are a SuperNode—then you connect to other SuperNodes and start taking connection from Nodes--or a Node—find a SuperNode that will allow you to connect to him.
· Routing by broadcasting between SuperNodes
· Replies are routed back along the path that they came from
· Downloading---direct connection (sending and replying via HTTP)