1 / 66

P2P and more …

P2P and more …. Rumen Stainov http://www2.hs-fulda.de/~stainov/erasmus/TUSofia/ L: TKSoft P: kommsoft06 rumen.stainov@informatik.hs-fulda.de. Peer-to-Peer – what is this ?. Peer-to-Peer – what is this ?. System Architectures. Client-Server Data Centers / Cloud Computing

Download Presentation

P2P and more …

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 and more … Rumen Stainov http://www2.hs-fulda.de/~stainov/erasmus/TUSofia/ L: TKSoft P: kommsoft06 rumen.stainov@informatik.hs-fulda.de

  2. Peer-to-Peer – what is this ?

  3. Peer-to-Peer – what is this ?

  4. System Architectures • Client-Server • Data Centers / Cloud Computing • Peer-to-peer (P2P) • Hybrid Client-Server and P2P

  5. client/server Client-Server Architecture Server: • Always-on Host • Permanent IP address • Server Farms for Scaling Clients: • communicate with server • may be intermittently connected • may have dynamic IP addresses • do not communicate directly with each other

  6. Google Data Centers • Estimated cost of data center: $600M • Google spent $2.4B in 2007 on new data centers • needs 50-100 Megawatt electricity

  7. peer-peer Pure P2P Architecture • no always-on server • arbitrary end systems directly communicate • peers are intermittently connected and change IP addresses Highly scalable but difficult to manage

  8. Server-client vs. P2P: File Distribution Time

  9. Hybrid of Client-Server and P2P Skype • voice-over-IP P2P application • centralized server: finding address of remote party: • client-client connection: direct (not through server) Instant messaging • chatting between two users is P2P • centralized service: client presence detection/location • user registers its IP address with central server when it comes online • user contacts central server to find IP addresses of buddies

  10. Peer-to-Peer – what is this ? First Idea – Direct downloading of (music) files Shawn Fanning, Boston Student, called Napster

  11. “beastieboy” • song1.mp3 • song2.mp3 • song3.mp3 • “kingrook” • song4.mp3 • song5.mp3 • song6.mp3 • “slashdot” • song5.mp3 • song6.mp3 • song7.mp3 Napster File Sharing: 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. User starts Napster and connects to the server • 2. Napster creates a Dynamic Directory of the personal .mp3 collection of the user 3. beastieboy enters search criteria s o n g 5 4. Napster shows the hits to beastieboy 5.beastieboy connects direcly to kingrook for file transfer • song5.mp3

  12. Peer-to-Peer Systems Second Idea, Using Fat Clients for Resources Sharing • Thin client  Fat client DEC’S VT100 No Memory IBM 8-bit PC @ 4.77MHz 360k Diskette 64-bit PC @ 4-core 4GHz1 TB HD Peer-to-Peer (P2P)

  13. 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??? 13

  14. 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 14

  15. SETI@Home – stat MUX using parallel computing resources

  16. Peer-to-Peer – what is this ? DHT Third Idea – Searching for (music) files on all peers Distributed Hash Table (DHT) - BitTorrent, Kademlia, eMule

  17. Peer-to-Peer – what is this ? Hash function f(x) = x mod 5 Hash function f(x) = x mod 6 0 1 2 3 4 5 15 6 23 8 19 10

  18. Peer-to-Peer – what is this ? Hash function f(x) = x mod 5 Hash function f(x) = x mod 6 0 1 2 3 4 5 15 6 23 8 19 10

  19. Peer-to-Peer – what is this ? The virtual DHT address space 0 1 2 3 4 5 DHT 15 6 23 8 19 10

  20. Peer-to-Peer Systems: DHT Idea: • A lookup service similar to a hash table: (key, value) pairs are stored in the DHT, • Responsibility for maintaining the mapping from keys to values is distributed among the nodes, • Scales to extremely large numbers of nodes Tasks of DHT are: • To find the location of the searched resource (data). • Equal distribution of the resources to the nodes. • Routing to the node storing the resource from any other node.

  21. Peer-to-Peer Systems: DHT • Each node has a search operation (lookup) • Find the value associated with the key • The nodes maintain routing pointers (Finger poiters) to other nodes if the resource is not local.

  22. Peer-to-Peer – what is this ? • The virtual DHT address space Advantages: • Load Balancing. Equal distribution of objects and peer in the DHT address space. • Scalability. Adding and removing of peers concerns the neighbors only . • Fast Lookup. The object‘s ID defines the peer ID • Availability.No central component (server) exists, which could fail. • Anonymity. In P2P we address not a computer (e.g. server), but contents. 0 1 2 3 4 5 DHT

  23. Peer-to-Peer Systems: DHT Lookup in P2P Applications

  24. Peer-to-Peer – what is this ? • The virtual DHT address space Disadvantages: • Geographic or network location is irrelevant (Overlay) • Routing and data transfer over continents (speed) • Dealing with disconnected (crashed) nodes • Especially in mobile networks 0 1 2 3 4 5 DHT

  25. Peer-to-Peer Systems: DHT The steps for look up in Chord are logarithmic The size of the routing table is logarithmic Example: log2(1000000)≈20 Effective ! Consistentent Hashing

  26. 0 15 1 14 2 13 3 12 4 5 11 6 10 7 9 8 Peer-to-Peer Systems: Chord The nodes build a modulo 2m ring (Chord Ring). The node Ids are created by hashing of IP addreses and the resource IDs by hashing of the recource key. Those IDs build a ID ring modulo 2m. • H(a) = 6 • H(b) = 5 • H(c) = 0 • H(d) = 11 • H(e) = 2 26 Each node a,b,c,d,e calculates an ID using the hash function H

  27. 0 15 1 14 2 13 3 12 4 5 11 6 10 7 9 8 Peer-to-Peer Systems: Chord • The succesor (succ) of an Identificator is the first node clockwise. • Example: • succ(12)=14 • succ(15)=2 • succ(6)=6 27

  28. 0 15 1 14 2 13 3 12 4 5 11 6 10 7 9 8 Peer-to-Peer Systems: Chord Each resource calculates an ID using the hash function H. Example: H(“Marina”)=12, H(“Peter”)=14, H(“Rumen”)=4, H(“Stefan”) = 9. • Resource-Ids are maped in the same or in successor (succ) node and are stored in this node. • “Marina”  succ(12) = 0 • “Peter”  succ(14) = 0 • “Rumen”  succ(4) = 5 • “Stefan”  succ(9) = 11 28

  29. Peer-to-Peer Systems: Chord • Each node points to his successor (succ), the so called succ pointer. • Each node points to his predecessor (pred), the so called pred pointer.

  30. 0 15 1 14 2 13 3 12 4 5 11 6 10 7 9 8 Peer-to-Peer Systems: Chord Lookup of the key “Rumen” from node 2: • Calculate H(“Rumen”) = 9 • Go to succ pointers until „9“ is found, i.e. • Lookup the nodes 2, 5,6,11 (BINGO) • Value „Fulda“ is sent back to node 2 . 30

  31. 0 15 1 14 2 13 3 12 4 5 11 6 10 7 9 8 Peer-to-Peer Systems: Chord The steps for look up in Chord are logarithmic The size of the routing table is logarithmic Example: log2(1000000)≈20 Effective ! Speed up of the lookup. Using Succ pointers in succ(n+1), we need in the worse case N steps for N nodes. We can achieve a speed up, if we use a pointer in succ (n+2M-1). In our example the node 0 should point to the nodes succ (0+1)=2, succ (0+2)=2, succ (0+4)=5, succ (0+8)=11 zeigen. • succ (0+1)=2 • succ (0+2)=2 • succ (0+4)=5 • succ (0+8)=11 • The distance is first the half. • Pointer to succ(n+2M-1) Finger table node n: Finger points to the succesor of n + 2i finger[i] = successor (n + 2i) 31

  32. Peer-to-Peer Systems: Chord • Routing to 15 (Get (15)) goes in considerable less steps (log2(N) steps insteat of N steps in the worst case)

  33. Get(8) Get(15) Peer-to-Peer Systems: Chord 0 0 15 1 15 15 1 2 2 14 14 • Prinzip of the lookup – find the next predecessor. 13 13 3 3 12 12 4 4 11 11 5 5 10 10 6 6 9 9 7 7 8 8 8

  34. Peer-to-Peer Systems: Chord • A new peer joins and informs his successor. 15 13

  35. 0 15 1 2 14 13 3 2 12 8 9 14 12 4 11 5 10 6 9 7 8 Peer-to-Peer Systems: Chord The new peer takes the corresponding resources from his successor. Join

  36. 12 2 14 Peer-to-Peer Systems: Chord The new peer takes the corresponding resources from his successor. 0 15 1 2 14 13 3 12 4 9 8 11 5 10 6 9 9 7 8 8

  37. What is the problem ? • Internet access over different networks on different cost. • The communication with the mobile device could be temporarily (or even for a longer period) interrupted. • Heterogeneous mobile devices according to their computing, transmission and storage capacity. MOBILITY SUPPORT

  38. Existing Solutions 0 1 2 3 4 5 DHT Proprietary add-on layer to the existing P2P systems for caching or buffering of data units at the powerful peers broadcast channels, feeds throw boxes data MULEs Emails per POST

  39. Peer Port PUSH Data Object Sending Peer Receiving Peer DHT Our Idea • Peer Port represents "ordered message buffer" for a redundant persistent P2P communication. • Difference to the existing approaches: • Peer Port is redundant to the primary P2P channel and is used only in case of interruption • Peer Port is a part of the P2P system and continues receiving data after the interruption

  40. Peer Port PUSH Data Object Sending Peer Receiving Peer DHT Peer Port Normal operation with redundant buffering (PUSH) • Registration with the Peer Group: • creates a peer port. • defines his size and validity date/time. • sets-up a unique sequence number for messages. • creates a ticket for accessing it over PULL.

  41. Peer Port Peer Group PUSH PULL Data Object Receiving Peer Sending Peer Bang DHT Peer Port Data recovery (PULL) after interruption. PULL the missing messages at “low cost” messages ID = [peer port ID, message sequence number] Continue with persistent communication over the Peer Port

  42. Peers as relays - Example • Problem when both Alice and Bob are behind “NATs”. • NAT prevents an outside peer from initiating a call to insider peer • Solution: • Using Alice’s and Bob’s SNs, Relay is chosen • Each peer initiates session with relay. • Peers can now communicate through NATs via relay

  43. Use Case A famous orthodontist is traveling WiMAX His colleague in the practice needs frequently consultations over video & VoIP, but: Because of entering a tunnel, the WiMAX connection is interrupted shortly. A normal P2P channel will lose information, so that this part has to be repeated. Solution: the missed information will be taken from the peer port and can be played, even couple of minutes later. The connection over WiMAX is replaced by 3G/GPRS. A normal P2P channel will be disconnected, and after reconnection the missing audio and video transmission has to be repeated. Solution: the transmission continues over the peer port.

  44. Advantages of Peer Ports P2P technology.The peer port inherits the P2P advantages like low cost, availability, high bandwidth, scalability and anonymity. Delay tolerant.The peer ports overlay will be tailored to the context of the delay tolerant networking and will be used for add-on persistent communication with the goal that each message will eventually be delivered to its destination. Low cost recovery after interruption.The peers belonging to the group are chosen to be “near” the receiver, building on this way a location aware group. Network independent recovery.Sending peers will push the data into the peer ports; receiving peers will pull data from them, if necessary.

  45. PEER PORTS for layered p2p streamING

  46. Peer Ports Implementation • New Problems: • received and processed data should be removed • missing data could be requested from Peer Port • A new Peer Port Sliding Window Protocol is needed. • New Ideas: •  Peer Ports for Layered Streaming.

  47. Peer Port Peer Group PUSH ACK + miss. data control + req. Data Object Sending Peer Receiving Peer DHT Peer Port Sliding Window • During the Normal Operation: • Transient (direct) communication between Sending and Receiving Peers • Sliding Window between the Receiving Peer and the Peer Port.

  48. Peer Port Peer Group PUSH PUSH data + ack control + req. Data Object Receiving Peer Sending Peer DHT Peer Port Sliding Window • After Interruption: • Persistent (indirect) communication between Sending and Receiving Peers • Sliding window between the Receiving Peer and the Peer Port.

  49. Peer Ports for Layered Streaming • Layered coding: • The basic media stream is first encoded into a base layer providing the minimum quality and requiring the minimum bandwidth. • The enhancement layers are encoded separately into separate packets, where each additional layer contributes to the improving the quality of the media played. • More enhancement layers introduce better video quality Baselayer

  50. Peer Ports for Layered Streaming Existing Application in P2P: • Supplier & Receiver Side Schedulers • Scheduling mechanism to request absent blocks, based on 3 buffering windows: free stage, decision stage and remedy stage. • Our Approach: • Parallel transmission over 2 Peer Ports – one for basic layer stream, the another for enhancement layers.

More Related