Presentation is loading. Please wait.

Presentation is loading. Please wait.

Distributed Web Systems Peer-to-Peer Systems Lecturer Department University.

Similar presentations


Presentation on theme: "Distributed Web Systems Peer-to-Peer Systems Lecturer Department University."— Presentation transcript:

1 Distributed Web Systems Peer-to-Peer Systems Lecturer Department University

2 Outline Motivation Case studies: Napster et al P2P middleware: routing overlays

3 Motivation Demand for services in the Internet can be expected to grow to a scale that is limited only by the size of the world’s population Problem – scaling a centralised service to support such demand –Examples: Google, Amazon, eBay, etc. –Escalating administration and fault recovery costs –Limited bandwidth that can be provided to a single server site Peer-to-peer systems: –resources located on computers throughout a network –decentralised management and administration –lots of powerful desktop computers –growing connectivity (more than 100 million broadband connections world-wide by mid-2004)

4 Generations of P2P systems First –Napster and similar systems –centralised indexing of resources Second –Freenet, Gnutella, Kazaa, BitTorrent, etc –greater scalability, anonymity and fault tolerance Third –Pastry, Tapestry –P2P middleware layers for application-independent management of distributed resources

5 Napster P2P file sharing system –launched in 1999 –became very popular for music exchange –several million users registered at its peak –thousands swapping files simultaneously Architecture –peer computers –central index servers

6 Napster protocol How it works: –Each user must have Napster software in order to participate –A connection between the user's computer and one of Napster's Central Servers is established –The Napster Central Server keeps a directory of all client computers connected and files residing on them –If a user wants a certain file, they place a request to the Napster Centralised Server that it's connected to. –The Napster Server looks up its directory to see if it has any matches for the user's request. –The Server sends the user a list of all that matches, IP address, user name, file size, ping number, bit rate etc. –The user chooses the file to download and tries to establish a direct connection with the computer upon which the desired file resides. –The file transfer is done between the peers directly

7 File exchange in Napster © Pearson Education 2005

8 Issues with Napster Scalability and reliability –the index servers are the bottle neck Anonymity and legal –the index servers can by used to obtain information about interests of all users on the networks –the developers argued that they were not liable for the copyright infringement since they did not participate in copying the files –however, the index servers were deemed an essential part of the process

9 Freenet and Gnutella Peer discovery: –connecting computers advertise their presence in the networks. These requests are forwarded on to other peers –TTL in the messages is used to manage the network load Querying for resources: –similar mechanism – forwarding queries until the resource is found –replies are returned via the same path and intermediate peers can cache them

10 Freenet and Gnutella (contd.) Servers that do not have matching resources, need not send a reply to save network bandwidth

11 Freenet and Gnutella analysis Advantages: –no single point of failure or single point of attack (especially for censors) –more anonymity (peers often only know the immediate peer the request came from, not the originator) Problems: –scalability: only part of the network is visible to each peer, increasing this horizon dramatically increases the network traffic –susceptibility to denial of service attacks –“free riding” and overloading of popular peers Newer systems like BitTorrent attempt to fix some of these issues.

12 P2P middleware Functional requirements –locating and accessing resources throughout the network Non-functional requirements –scalability –load balancing –optimising for local interactions between neighbouring peers –coping with highly dynamic host availability –security and trust –anonymity, deniability and resistance to censorship

13 Routing overlays Ensures that each node can access any object by routing requests through a sequence of nodes exploiting knowledge at each of them Object: Node: D C’s routing knowledge D’s routing knowledgeA’s routing knowledge B’s routing knowledge C A B © Pearson Education 2005

14 Overlays case studies Active area or research Pastry –prefix routing approach –each node and object are assigned a GUID for nodes – hash of the node’s public key for objects – hash of the object’s name (or part of its contents) –Pastry will route a message to any GUID in O(log N) steps –If the target node is not active, the message is delivered to active node with the closest GUID

15 Pastry routing algorithm Simple version first: –each node stores addresses of L nodes with the closest GUIDs on either side –the message is forwarded to the node with the closest GUID –N/2L hops to deliver a message – inefficient!

16 Pastry routing algorithm The more efficient version: –uses routing tables –the number of rows is equal to the number of hexadecimal digits in the GUID –each entry in the raw can hold address of the node with the corresponding common GUID prefix that will be used to forward the request Algorithm idea: –forward to the peer from the routing table with the largest matching GUID prefix

17 Pastry routing table

18 Pastry routing example with the aid of a well-populated routing table, the message can be delivered in approx. log 16 (N) hops

19 More Pastry… Host integration (new nodes joining the network) –building of the routing table (please see the book for details) Fault tolerance –Pastry nodes send regular “hear beat” messages to their neighbours –Failed nodes are detected and the routing tables are updated accordingly

20 Tapestry Similar idea to Pastry, but different API –supports publishing of resource replicas with the same GUID 4228 4377 437A 4361 43FE 4664 4B4F E791 4A6D AA93 57EC 4378 Phil’s Books 4378 Phil’s Books (Root for 4378) publish path Tapestry routings for 4377 Location mapping for 4378 Routes actually taken by send(4378) © Pearson Education 2005

21 Applications… Please have a look at the case studies for Squirrel, OceanStore, Ivy utilising the described routing overlays…

22 Summary Peer-to-peer systems attempt to solve the problems of scalability and demand for services in the Internet –Distributing resources throughout a network –Decentralised control Popular examples: Napster, Gnutella, Freenet, … Further research: Pastry, Tapestry, … Questions


Download ppt "Distributed Web Systems Peer-to-Peer Systems Lecturer Department University."

Similar presentations


Ads by Google