Peer-To-Peer Systems
Total Page:16
File Type:pdf, Size:1020Kb
Peer-to-Peer Systems Winter semester 2014 Jun.-Prof. Dr.-Ing. Kalman Graffi Heinrich Heine University Düsseldorf Peer-to-Peer Systems Unstructured P2P Overlay Networks – Unstructured Heterogeneous Overlays This slide set is based on the lecture "Communication Networks 2" of Prof. Dr.-Ing. Ralf Steinmetz at TU Darmstadt Unstructured Heterogeneous P2P Overlays Unstructured P2P Structured P2P Centralized P2P Homogeneous P2P Heterogeneous P2P DHT-Based Heterogeneous P2P 1. All features of 1. All features of 1. All features of 1. All features of 1. All features of Peer-to-Peer Peer-to-Peer Peer-to-Peer Peer-to-Peer Peer-to-Peer included included included included included 2. Central entity is 2. Any terminal 2. Any terminal 2. Any terminal 2. Peers are necessary to entity can be entity can be entity can be organized in a provide the removed without removed without removed hierarchical service loss of loss of without loss of manner 3. Central entity is functionality functionality functionality 3. Any terminal some kind of 3. ! no central 3. ! dynamic central 3. ! No central entity can be index/group entities entities entities removed without database 4. Connections in loss of functionality the overlay are Examples: “fixed” Examples: Examples: § Gnutella 0.6 Examples: Examples: § Napster § Gnutella 0.4 § Fasttrack § Chord • AH-Chord § Freenet § eDonkey § CAN • Globase.KOM § Kademlia from R.Schollmeier and J.Eberspächer, TU München HHU – Technology of Social Networks – JProf. Dr. Kalman Graffi – Peer-to-Peer Systems – http://tsn.hhu.de/teaching/lectures/2014ws/p2p.html 3 Principles – Hierarchical / Heterogeneous Approach: ++ Advantages to combine best of both worlds § More robust than § Robustness by distributed centralized solutions indexing § Faster searches than in § Fast searches by server pure P2P systems queries -- Disadvantages Components § Need of algorithms to § Supernodes choose reliable supernodes • Mini servers / super peers • Used as servers for queries – To build a sub-network between supernodes – Queries distributed at sub- network between supernodes § “Normal” peers • Have only overlay connections to supernodes Picture from R.Schollmeier and J.Eberspächer, TU München HHU – Technology of Social Networks – JProf. Dr. Kalman Graffi – Peer-to-Peer Systems – http://tsn.hhu.de/teaching/lectures/2014ws/p2p.html 4 Peer-to-Peer Filesharing History HHU – Technology of Social Networks – Technology HHU – of P2P Filesharing JProf . Dr. Dr. Kalman Graffi – Peer-to-Peer Systems – http:// Graffi Networks 8 / 25 / tsn.hhu.de /teaching/lectures/2014ws/p2p.html 5 © Fraunhofer-Gesellschaft 2012 Decentralized File Sharing with Distributed Servers For example: eDonkey see e.g. • http://www.overnet.org/ • http://www.emule-project.net/ • http://savannah.gnu.org/projects/mldonkey/ eDonkey file-sharing protocol § Most successful/used file-sharing protocol in • e.g. Germany & France in 2003 [see sandvine.org] – 52% of generated P2P file sharing traffic – KaZaA only for 44% in Germany § Stopped by law • February 2006 largest server „Razorback 2.0“ disconnected be Belgium police – http://www.heise.de/newsticker/eDonkey-Betreiber-wirft-endgueltig-das- Handtuch--/meldung/78093 HHU – Technology of Social Networks – JProf. Dr. Kalman Graffi – Peer-to-Peer Systems – http://tsn.hhu.de/teaching/lectures/2014ws/p2p.html 6 The eDonkey Network - Principle Distributed server(s) § Set up and RUN BY POWER-USERS § à nearly impossible to shut down all servers § Exchange their server lists with other servers • using UDP as transport protocol § Manages file indices Client application § Connects to one random server and stays connected § Using a TCP connection § Searches are directed to the server § Clients can also extend their search • by sending UDP search messages to additional servers HHU – Technology of Social Networks – JProf. Dr. Kalman Graffi – Peer-to-Peer Systems – http://tsn.hhu.de/teaching/lectures/2014ws/p2p.html 7 Edonkey functionality eDonkey hash can be used for several queries § eDonkey server • Search for peers – Servers block requests if too many requests are sent § Kad network à additional structure p2p overlay • Search for peers (including peers behind a firewall) – Very efficient (10 requests per second) Queries to peers – Finds more peers than found using servers • Ratings and comments for all Kad peers – Not used very widely § Directly from the peer (requests to a specific file) • Query for the filename – About 65 % of all peers answer with filename • Ratings and comments of the peer • Search for further peers HHU – Technology of Social Networks – JProf. Dr. Kalman Graffi – Peer-to-Peer Systems – http://tsn.hhu.de/teaching/lectures/2014ws/p2p.html 8 The eDonkey Network Search TCP UDP Server List Exchange Supernode Download Node Extended Search HHU – Technology of Social Networks – JProf. Dr. Kalman Graffi – Peer-to-Peer Systems – http://tsn.hhu.de/teaching/lectures/2014ws/p2p.html 9 The eDonkey Network Procedure Search § New servers send • their port + IP to other servers (UDP) Server List § Servers send Exchange • server lists (other servers Download they know) to the clients § Server lists can also be Extended downloaded on various Search websites TCP UDP Supernode Node HHU – Technology of Social Networks – JProf. Dr. Kalman Graffi – Peer-to-Peer Systems – http://tsn.hhu.de/teaching/lectures/2014ws/p2p.html 10 The eDonkey Network eDonkey Files are identified by § This helps in § Unique MD4 • Resuming a download ● Filesharing network with most files • Message-Digest from a different source ● CentralizedAlgorithm4, P2P network RFC 1186 with file many eDonkey• Downloading servers the same file hashes from multiple sources at ● Additional• 16 byte DHT: long Kad the same time § Are not identified by • Verification that the file has ● eDonkey hash is created directly from file content filenames been correctly downloaded 2 1 0 2 t f a h c s l l e s e G - r e f o h n u a r F HHU – Technology of Social Networks – JProf. Dr. Kalman Graffi – Peer-to-Peer Systems – http://tsn.hhu.de/teaching/lectures/2014ws/p2p.html 11 © 10 / 25 The eDonkey Network à the SEARCH consists of two steps 1. Full text search to • Connected server (TCP) or • Extended search with UDP to other known servers. § Search result are the hashes of matching files 2. Query Sources • Query servers for clients offering a file with a certain hash Later • Download from these sources Status: 1,229,568 users, 37,399,014 files (30.08.2012) HHU – Technology of Social Networks – JProf. Dr. Kalman Graffi – Peer-to-Peer Systems – http://tsn.hhu.de/teaching/lectures/2014ws/p2p.html 12 The eDonkey Network à the alternate SEARCH consists of two steps 0. Participate in the KAD network 1. Know MD4 – hash of file 2. Query Sources in KAD § Send lookup to node responsible for file hash § Query responsible node for clients offering the Later • Download from these sources Status: 600k-2M users, 200M-600M files (30.08.2012) HHU – Technology of Social Networks – JProf. Dr. Kalman Graffi – Peer-to-Peer Systems – http://tsn.hhu.de/teaching/lectures/2014ws/p2p.html 13 Testing the Content in Edonkey Networks Forensic Test set Consists out of about 1500 files § Images, music, videosHits, documents and miscellaneous ● Hitrate: 385 / 1479 (26 %) § Images: Fraunhofer, Windows 7, KDE, 4chan § Music: mainly three big music collections § Videos: YouTube, Open Source Films, P2P, ... § Documents: diverse PDFs, Fraunhofer, BitTorrent § Miscellaneaous: Zips, 2 1 0 2 executables, Malware, ... t f a h c s l l e s e G - r e f o h 14 n HHU – Technology of Social Networks – JProf. Dr. Kalman Graffi – Peer-to-Peer Systems – http://tsn.hhu.de/teaching/lectures/2014ws/p2p.html u a r F © 21 / 25 KaZaA: Decentralized File Sharing with Super Nodes see § www.kazaa.com, gift.sourceforge.net, http://www.my-k-lite.com/ System § Developer: Fasttrack § Clients: KaZaA Properties: § Most successful P2P network in USA in 2002/3 Architecture: neither completely central nor decentralized § Supernodes to reduce communication overhead #downloads P2P system #users #files terabytes (from download.com Fasttrack 2,6 Mio. 472 Mio. 3550 4 Mio. eDonkey 230.000 13 Mio. 650-2600 600.000 Gnutella 120.000 28 Mio. 105 Ca. 525.000 Numbers are from 10‘2002 HHU – Technology of Social Networks – JProf. Dr. Kalman Graffi – Peer-to-Peer Systems – http://tsn.hhu.de/teaching/lectures/2014ws/p2p.html 15 Decentralized File Sharing with Super Nodes Examples: KaZaA, Gnutella 0.6 (Morpheus, mldonkey) Peers § Connected only to some super nodes § Send IP address and file names only to super peers Super nodes - super peers: § Peers with high-performance network connections § Take the role of the central server and proxy for simple peers § Answer search messages for all peers (reduction of comm. load) § One or more supernodes can be removed without problems Additionally, the communication between nodes is encrypted Search Service Search Delivery Superpeer Download Peer HHU – Technology of Social Networks – JProf. Dr. Kalman Graffi – Peer-to-Peer Systems – http://tsn.hhu.de/teaching/lectures/2014ws/p2p.html 16 Example for KaZaA HHU – Technology of Social Networks – JProf. Dr. Kalman Graffi – Peer-to-Peer Systems – http://tsn.hhu.de/teaching/lectures/2014ws/p2p.html 17 Decentralized File Sharing with Complete Files Drone 1 has § 50 KB/s upload rate § not utilized Drone 1 receives until he has whole file § 25% of the file § at 12,5 KB/s rate Queen Bee has § 100 MB file § 50 KB/s upload rate in total At the beginning Later From www.wtata.com HHU – Technology of Social Networks – JProf. Dr. Kalman Graffi – Peer-to-Peer Systems – http://tsn.hhu.de/teaching/lectures/2014ws/p2p.html 18 Issues with KaZaA / Gnutella 0.6 Keyword-based search § You do not know what you get § Pollution a problem • Music companies flooded the network with false files • Chance to get a “good” file ~ 10% • Problem for “small” files Full file download before uploading § User go offline after download finished § Only few uploaders online § Problem for “large” files HHU – Technology of Social Networks – JProf.