Kent State University
Total Page:16
File Type:pdf, Size:1020Kb
FOUNDATION OF PEERPEER--TOTO--PEERPEER SYSTEMS A Course on Foundations of PeerPeer--toto--PeerPeer Systems & Applications LECT-07, S-1 FP2P08S, [email protected] Javed I. Khan@2008 CS 6/75995 Kent State Foundation of PeerPeer--toto--PeerPeer University Applications & Systems Dept. of Computer Science www.cs.kent.edu/~javed/classwww.cs.kent.edu/~javed/class--P2P08/P2P08/ LECTLECT--77 2 1 FOUNDATION OF PEERPEER--TOTO--PEERPEER SYSTEMS Vibrant Systems: Gnutella Family LECT-07, S-3 FP2P08S, [email protected] Javed I. Khan@2008 Classification [*Eberspacher & Schollmeier 2005] FOUNDATION OF Client-Server Peer-to-Peer PEERPEER--TOTO--PEERPEER SYSTEMS 1. Server is the central 1. Resources are shared between the peers entity and only 2. Resources can be accessed directly from other peers provider of service 3. Peer is provider and requestor (Servent concept) and content. Network managed Unstructured P2P Structured P2P by the Server Centralized P2P Pure P2P Hybrid P2P DHT-Based 2. Server as the higher performance system. 1. All features of Peer-to- 1. All features of Peer-to- 1. All features of Peer-to- 1. All features of Peer-to- Peer included Peer included Peer included Peer included 3. Clients as the lower performance system 2. Central entity is 2. Any terminal entity can 2. Any terminal entity can 2. Any terminal entity can necessary to provide the be removed without loss be removed without loss be removed without loss service of functionality of functionality of functionality Example: WWW 3. Central entity is some 3. No central entities 3. dynamic central 3. No central entities kind of index/group Examples: Gnutella 0.4, entities 4. Connections in the database Freenet Example: Gnutella 0.6, overlay are “fixed” Example: Napster JXTA Examples: Chord, CAN st nd 1 Gen. 2 Gen. LECT-07, S-4 FP2P08S, [email protected] Javed I. Khan@2008 2 Discussion on Centralized Systems • Disadvantages FOUNDATION OF PEERPEER--TOTO--PEERPEER – Single Point of Failure easily attackable SYSTEMS – Bottleneck – Potential of congestion – Central server in control of all peers • Advantages – Fast and complete lookup (one hop lookup) – Central managing/trust authority – No keep alive necessary, beyond content updates • Application areas – VoIP (SIP, H.323) – Auctioning (Ebay) LECT-07, S-5 FP2P08S, [email protected] Javed I. Khan@2008 Overview 1. General Characteristics of Early Peer-to-Peer Systems FOUNDATION OF 2. Centralized Peer-to-Peer Networks PEERPEER--TOTO--PEERPEER 1. Basic Characteristics SYSTEMS 2. Signaling Characteristics 3. Discussion 3. Pure Peer-to-Peer Networks 1. Basic Characteristics 2. Signaling Characteristics 3. Discussion 4. Hybrid Peer-to-Peer Networks 1. Basic Characteristics 2. Signaling Characteristics 3. Discussion LECT-07, S-6 FP2P08S, [email protected] Javed I. Khan@2008 3 Definition of Pure P2P • Any terminal entity can be removed without loss of functionality FOUNDATION OF PEERPEER--TOTO--PEERPEER • No central entities employed in the overlay SYSTEMS • Peers establish connections between each other randomly – To route request and response messages – To insert request messages into the overlay LECT-07, S-7 FP2P08S, [email protected] Javed I. Khan@2008 Model of Pure P2P Networks −1 −1.4 Degree distribution: c d, 0< d ≤ 7 p() d pd() = , withc = ∑ FOUNDATION OF 0, in any other case d c PEERPEER--TOTO--PEERPEER SYSTEMS average: d = 2.2 var()d = 1.63 According Sample Graph: Separate sub networks Major component LECT-07, S-8 FP2P08S, [email protected] Javed I. Khan@2008 4 Basic Characteristics of Pure P2P • Bootstrapping: – Via bootstrap-server (host list from a web server) FOUNDATION OF PEERPEER--TOTO--PEERPEER – Via peer-cache (from previous sessions) SYSTEMS – Via well-known host – No registration • Routing: – Completely decentralized – Reactive protocol: routes to content providers are only established on demand, no content announcements – Requests: flooding (limited by TTL and GUID) – Responses: routed (Backward routing with help of GUID) • Signaling connections (stable, as long as neighbors do not change): – Based on TCP – Keep-alive – Content search • Content transfer connections (temporary): – Based on HTTP – Out of band transmission LECT-07, S-9 FP2P08S, [email protected] Javed I. Khan@2008 Topology of Pure P2P FOUNDATION OF PEERPEER--TOTO--PEERPEER SYSTEMS Servent Connection between Connection between router & servent 2 servents (TCP) Connection between routers (Core) LECT-07, S-10 FP2P08S, [email protected] Javed I. Khan@2008 5 FOUNDATION OF PEERPEER--TOTO--PEERPEER SYSTEMS Example: Gnutella 0.4 LECT-07, S-11 FP2P08S, [email protected] Javed I. Khan@2008 Gnutella 0.4 • Program for sharing files over the Internet • Focus: decentralized method of searching for files FOUNDATION OF PEERPEER--TOTO--PEERPEER • A “disruptive” application/technology? SYSTEMS • Adecade of existence on March 14, 2010 In late 2007, it was the most popular file sharing network on the Internet with an estimated market share of more than 40%. • Brief History: – March 2000 : open source release by by Justin Frankel and Tom Pepper of Nullsoft, a division of AOL, and almost immediately withdrawn because of legal concern. – This did not stop Gnutella; after a few days, the protocol had been reverse engineered , and compatible free and open-source clones began to appear. – Still the third most popular filesharing system (after Bitorrent & FastTrack), 2008. – Spring 2001 : further developments to improve scalability Gnutella 0.6 (Hybrid P2P) – Since then: • available in a lot of implementations (Limewire, bearshare,…) LECT-07, S-12 • Developed further on (privacy, scalability, performance,…) FP2P08S, [email protected] Javed I. Khan@2008 6 The Gnutella Network FOUNDATION OF PEERPEER--TOTO--PEERPEER SYSTEMS LECT-07, S-13 Measurements taken at the LKN in May 2002 FP2P08S, [email protected] Javed I. Khan@2008 Gnutella: How Does It Work • Application-level, peer-to-peer protocol over point-to-point TCP FOUNDATION OF Partcipants: PEERPEER--TOTO--PEERPEER – Gnutella peers/servents SYSTEMS – Router Service G • Flood incoming requests (regard TTL!) – Keep alive G G – content G • Route responses for other peers (regard GUID of message) G Peer/ – Keep alive (PING/PONG) G Servent G – Content (QUERY/QUERYHIT) G • Data-requests G • Download-requests G – Lookup Service TCP connection • Initialize Data requests G G • Initialize keep alive requests – “Server”-Service • Serve Data-requests (HTTP) • Five steps: – Connect to at least one active peer (address received from bootstrap) – Explore your neighborhood (PING/PONG) – Submit Query with a list of keywords to your neighbors (they forward it) – Select “best” of correct answers (which we receive after a while) – Connect to providing host/peer LECT-07, S-14 FP2P08S, [email protected] Javed I. Khan@2008 7 Node Joining • In order to join the system a new node/servent FOUNDATION OF PEERPEER--TOTO--PEERPEER initially connects to one of several known hosts that SYSTEMS are almost always available (e.g., gnutellahosts.com). • Once attached to the network (e.g., having one or more open connections with nodes already in the network), nodes send messages to interact with each • other. LECT-07, S-15 FP2P08S, [email protected] Javed I. Khan@2008 PING & PONG • Used to Establish Group Membership. FOUNDATION OF PEERPEER--TOTO--PEERPEER SYSTEMS • A node joining the network initiates a broadcasted PING message to announce its presence. • When a node receives a PING message it forwards it to its neighbors and initiates a back-propagated PONG message. • The PONG message contains information about the node such as its IP address and the number and size of shared files. LECT-07, S-16 FP2P08S, [email protected] Javed I. Khan@2008 8 QUERY & QUERY HIT • Used For Searching . FOUNDATION OF PEERPEER--TOTO--PEERPEER SYSTEMS • QUERY messages contain a user specified search string that each receiving node matches against locally stored file names. QUERY messages are broadcasted. • QUERY RESPONSES are back-propagated replies to QUERY messages and include information necessary to download a file. LECT-07, S-17 FP2P08S, [email protected] Javed I. Khan@2008 Gnutella Message Structure FOUNDATION OF General Header Structure: PEERPEER--TOTO--PEERPEER SYSTEMS MESSAGEHEADER : 23Byte GnodeID Function TTL Hops Payload Length 16 Bytes 1 Byte 1 Byte 1 Byte 4 Bytes Describes the message Describes parameters of type (e.g. login, the message (e.g. IDs, search,…) keywords,…) • GnodeID : unique 128bit Id of any Hosts • TTL (Time-To-Live): number of servents, a message may pass before it is killed • Hops : number of servents a message already passed LECT-07, S-18 FP2P08S, [email protected] Javed I. Khan@2008 9 Gnutella Messages PING (Function:0x00) No Payload FOUNDATION OF PEERPEER--TOTO--PEERPEER PONG (Function:0x01) SYSTEMS Port IP Address Nb. of shared Files Nb. of Kbytes shared 2 Bytes 4 Bytes 4 Bytes 4 Bytes QUERY (Function:0x80) Minimum Speed Search Criteria 2 Bytes n Bytes QUERY HIT (Function:0x81) Nb. of Hits Port IP Address Speed Result Set GnodeID 1 Byte 2 Bytes 4 Bytes 1 Byte n Bytes 16 Bytes File Index File Name 4 Bytes n Bytes LECT-07, S-19 FP2P08S, [email protected] Javed I. Khan@2008 PONG MESSAGE FOUNDATION OF PEERPEER--TOTO--PEERPEER SYSTEMS Bytes Field name Description The port number on which the responding host 0-1 Port Number can accept incoming connections. The IP address of the responding host. Note: This 2-5 IP Address field is in big-endian format. Number of The number of files that the servent with the given 6-9 shared files IP address and port is sharing on the network. The number of kilobytes of data that the servent Number of 10-13 with the given IP address and port is sharing on kilobytes shared the network. 14- GGEP block OPTIONAL extension (see GGEP ). LECT-07, S-20 FP2P08S, [email protected] Javed I. Khan@2008 10 QUERY MESSAGE Bytes Field name Description FOUNDATION OF The minimum speed (in kb/second) of servents that should PEERPEER--TOTO--PEERPEER Minimum Speed respond to this message.