1 / 54

P2P Networking 2011

P2P Networking 2011. GET /index.html HTTP/1.0. HTTP/1.1 200 OK . Client/Server Architecture. Server. Clients. Peer-to-Peer Architecture. Gateway Server. Peers. The architectures. Server-based architecture Client-Server / Server-Cluster Problems : Limited resources

talmai
Download Presentation

P2P Networking 2011

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. P2P Networking 2011

  2. GET /index.html HTTP/1.0 HTTP/1.1 200 OK ... Client/Server Architecture Server Clients

  3. Peer-to-Peer Architecture Gateway Server Peers

  4. The architectures • Server-based architecture • Client-Server / Server-Cluster • Problems: • Limited resources • All loads are centered on the server • Server-based architecture has low scalability. • The setup and maintenance cost is high. • Peer-to-Peer (P2P) architecture • Advantages: • Distributing loads to all users • Users consume and provide resources • P2P architecture has high scalability. • The setup and maintenance cost is low.

  5. The Client Side • Today’s clients can perform more roles than just forwarding users requests • Today’s clients have: • more computing power • more storage space • Thin client  Fat client

  6. Evolution at the Client Side IBM 8-bit PC @ 4.77MHz 360k diskettes 64-bit PC @ 4-core 4GHz750GB HD DEC’S VT100 No storage 2011 ‘70 ‘80

  7. What Else Has Changed? • The number of home PCs is increasing rapidly • Most of the PCs are “fat clients” • As the Internet usage grow, more and more PCs are connecting to the global net • Most of the time PCs are idle • How can we use all this? Peer-to-Peer (P2P)

  8. What is peer-to-peer (P2P)? • “Peer-to-peer is a way of structuring distributed applications such that the individual nodes have symmetric roles. Rather than being divided into clients and servers each with quite distinct roles, in P2P applications a node may act as both a client and a server.”-- Charter of Peer-to-peer Research Group, IETF/IRTF, June 24, 2004(http://www.irtf.org/charters/p2prg.html)

  9. Resources Sharing • What can we share? • Computer-related resources • Shareable related-computer resources: • CPU cycles- seti@home, GIMPS • Bandwidth- PPLive, PPStream • Storage Space- OceanStore, Murex • Data - Napster, Gnutella • People - Buddy Finder • Camera, Microphone, Sensor, Service???

  10. SETI@Home • SETI – Search for Extra-Terrestrial Intelligence • @Home – On your own computer • A radio telescope in Puerto Rico scans the sky for radio signals • Fills a DAT tape of 35GB in 15 hours • That data have to be analyzed

  11. SETI@Home - Example

  12. MUREX: A Mutable Replica Control Scheme for Peer-to-Peer Storage Systems Jehn-Ruey Jiang ACN Lab NCU

  13. HotOS Attendee Murex: Basic Concept

  14. Video stream … … Peer-to-Peer Video Streaming

  15. Napster -- Shawn Fanning

  16. “beastieboy” • song1.mp3 • song2.mp3 • song3.mp3 • “kingrook” • song4.mp3 • song5.mp3 • song6.mp3 • “slashdot” • song5.mp3 • song6.mp3 • song7.mp3 Napster Sharing Style: hybrid center+edge Title User Speed song1.mp3 beasiteboy DSL song2.mp3 beasiteboy DSL song3.mp3 beasiteboy DSL song4.mp3 kingrook T1 song5.mp3 kingrook T1 song5.mp3 slashdot 28.8 song6.mp3 kingrook T1 song6.mp3 slashdot 28.8 song7.mp3 slashdot 28.8 1. Users launch Napster and connect to Napster server 2. Napster creates dynamic directory from users’ personal .mp3 libraries 3. beastieboy enters search criteria s o n g 5 4. Napster displays matches to beastieboy 5. beastieboy makes direct connection to kingrook for file transfer • song5.mp3

  17. History of Napster • 5/99: Shawn Fanning (freshman, Northeastern University) founds Napster Online (supported by Groove) • 12/99: First lawsuit • 7/01: simultaneous online users 160K • 6/02: file bankrupt • … • 10/03: Napster 2 (Supported by Roxio) (users should pay $9.99/month)

  18. Gnutella -- Justin Frankel and Tom Pepper

  19. The ‘Animal’ GNU GNU: Recursive Acronym GNU’s Not Unix …. + Gnutella = GNU Nutella Nutella: a hazelnut chocolate spread produced by the Italian confectioner Ferrero….

  20. GNU • GNU's Not Unix • 1983 Richard Stallman (MIT) established Free Software Foundation and Proposed GNU Project • Free software is not freeware • GPL: GNU General Public License

  21. Gnutella History • Gnutella was written by Justin Frankel, the 21-year-old founder of Nullsoft. • (Nullsoft acquired by AOL, June 1999) • Nullsoft (maker of WinAmp) posted Gnutella on the Web, March 14, 2000. • A day later AOL yanked Gnutella, at the behest of Time Warner. • Too late: 23k users on Gnutella • People had already downloaded and shared the program. • Gnutella continues today, run by independent programmers.

  22. Gnutella Protocol Scenario: Joining Gnutella Network • The new node connects to a well known ‘Anchor’ node or ‘Bootstrap’ node. • Then sends a PING message to discover other nodes. • PONG messages are sent in reply from hosts offering new connections with the new node. • Direct connections are then made to the newly discovered nodes. Gnutella Network New PING PING PING PONG PING PING A PING PING PONG PING PING PING

  23. Peer-to-Peer Overlay Network Focus at the application layer

  24. Peer-to-Peer Overlay Network End systems one hop (end-to-end comm.) a TCP thru the Internet Internet

  25. Topology of a Gnutella Network

  26. Gnutella: Issue a Request xyz.mp3 ?

  27. Gnutella: Flood the Request

  28. Gnutella: Reply with the File Fully distributed storage and directory! xyz.mp3

  29. So Far n: number of participating nodes • Centralized : - Directory size – O(n) - Number of hops – O(1) • Flooded queries: - Directory size – O(1) - Number of hops – O(n)

  30. We Want • Efficiency : O(log(n)) messages per lookup • Scalability : O(log(n)) state per node • Robustness : surviving massive failures

  31. How Can It Be Done? • How do you search in O(log(n)) time? • Binary search • You need an ordered array • How can you order nodes in a network and data objects? • Hash function!

  32. Object ID (key):AABBCC Object ID (key):DE11AC SHA-1 SHA-1 Example of Hasing Shark 194.90.1.5:8080

  33. Basic Idea P2P Network Publish (H(y)) Join (H(x)) Object “y” Peer “x” H(y) H(x) Peer nodes also have hash keys in the same hash space Objects have hash keys y x Hash key Place object to the peer with closest hash keys

  34. Mapping an object to the closest node with a larger key 0 M - a node - an data object

  35. Internet Viewed as a Distributed Hash Table 0 2128-1 Hash table Peer node

  36. DHT • Distributed Hash Table • Input: key (file name)Output: value (file location) • Each node is responsible for a range of the hash table, according to the node’s hash key. Objects’ directories are placed in (managed by) the node with the closest key • It must be adaptive to dynamic node joining and leaving

  37. How to Find an Object? 0 2128-1 Hash table Peer node

More Related