Presentation is loading. Please wait.

Presentation is loading. Please wait.

Peer-to-Peer Intro 5.4.2005 Jani & Sami Peltotalo.

Similar presentations


Presentation on theme: "Peer-to-Peer Intro 5.4.2005 Jani & Sami Peltotalo."— Presentation transcript:

1 Peer-to-Peer Intro 5.4.2005 Jani & Sami Peltotalo

2 Overview of P2P Overlay networks Current P2P applications –P2P file sharing –Instant messaging / voice over IP –P2P distributed computing

3 P2P Architectures

4 1G P2P: Centralized Network Fast search/query response times Simple Protocol Provides a high degree of performance and resilience Susceptible to being shutdown, single server or server farm e.g. Napster

5 2G P2P: Decentralized Network Slow search/query response times which generates large volumes of network traffic Network resilience and performance governed by users' PCs and their network connectivity No central points of failure or control e.g. Gnutella 0.4

6 3G P2P: Hybrid Architecture super-peers Improved search/query response times, with less traffic generated per query than decentralized networks The deployment of super-peers provides a high degree of performance and resilience No central points of failure or control e.g. FastTrack, Gnutella 0.6

7 4G P2P: Different type of architectures BitTorrent: centralized eDonkey2000: semi-centralized Overnet: decentralized

8 FastTrack Overview

9 FastTrack Clients: KaZaA, iMesh, Grokster... MP3s & entire albums, videos, games Decentralized network, supernodes act as temporary indexing servers (hierarchical architecture) Control data encrypted Everything in HTTP request and response messages Optional parallel downloading of files

10 supernodes originalnodes Each peer is either a supernode or is assigned to a supernode Selection criterias: CPU, memory, network connection Each SN has about 100-150 children nodes and has 30-50 TCP connections with other supernodes SN tracks the content and IP of its children nodes, not content under its neighboring SNs FastTrack: Architecture

11 FastTrack: Metadata When ON connects to SN, it uploads its metadata For each file: –File name –File size –Content Hash (MD5+CRC) –File descriptors: used for keyword matches during query Content Hash: –When peer A selects file at peer B, peer A sends ContentHash in HTTP request –If download for a specific file fails (partially completes), ContentHash is used to search for new copy of file

12 FastTrack: Overlay Maintenance List of potential supernodes included within software download New peer goes through the list until it finds operational supernode –Node “pings” (5-6) supernodes on the list and connects with the first replied SN –Connects and obtains more up-to-date list, with 200 entries –SNs in the updated list are “close” to ON If supernode goes down, node goes through the updated list and finds new supernode

13 FastTrack: Queries Node first sends query to supernode –Supernode responds with matches –If x matches found, done Otherwise, supernode forwards query to subset of supernodes –If total of x matches found, done Otherwise, query further forwarded –Probably by original supernode rather than recursively

14 FastTrack: Parallel Downloading and Recovery If file is found in multiple nodes, user can select parallel downloading Identical copies identified by ContentHash HTTP byte-range header used to request different portions of the file from different nodes Automatic recovery when server peer stops sending file –ContentHash is used to search for new copy of file

15 eDonkey2000 Overview

16 eDonkey2000 (ED2K) Semi-centralized network, includes index servers Many clients: eDonkey2000, MLDonkey, eMule, Shareaza... Index server: Lugdunum Used also for legal content delivery Files identified by hash (MD4) Possible to search files using web, founded ed2k links can be used to start file download –ed2k://|file|gentoo.linux.install-x86-minimal-2004.1 [found via www.FileDonkey.com].iso|85764096|F1819D1C731923327E1 40F09DB7400B6|/)

17 ED2K Communication: –client-connected index server: TCP –client-other index servers: UDP –index server-index server: UDP –client-client: TCP File transfer using Multisource File Transmission Protocol (MFTP) –also HTTP and BitTorrent supported

18 Index Server 1 Register to server, tell server own shared files Peer 1 Index Server 3 Index Server 2 Peer 4 (registered to index server 3) Index Server 1 XXXX.exePeer 2 YYYY.txtPeer 2 YYYY.exePeer 2 XXXX.txt XXXX.exe ZZZZ.txt ZZZZ.exe YYYY.txt ZZZZ.exe YYYY.txt YYYY.exe XXXX.exe Peer 2 (registered to index server 1) Peer 3 (registered to index server 2) Index Server 2 YYYY.txtPeer 3 ZZZZ.exePeer 3 Index Server 3 ZZZZ.txtPeer 4 ZZZZ.exePeer 4 ED2K: Registration

19 Index Server 1 Index Server 3 Index Server 2 Peer 4 (registered to index server 3) XXXX.txt XXXX.exe ZZZZ.txt ZZZZ.exe YYYY.txt ZZZZ.exe YYYY.txt YYYY.exe XXXX.exe Peer 2 (registered to index server 1) Peer 3 (registered to index server 2) ED2K: Registration Reply List of other index servers known by index server 1 Peer 1 (registered to index server 1) Index Server 1 XXXX.txtPeer 1 XXXX.exePeer 1 & Peer 2 YYYY.txtPeer 2 YYYY.exePeer 2

20 Index Server 1 Index Server 3 Index Server 2 Peer 4 Peer 2Peer 3 ED2K: File Search Peer 1 Search Files (TCP) Search Files (UDP) Search Files message includes: keyword optionally - min file size - max file size - availability - etc.

21 Index Server 1 Index Server 3 Index Server 2 Peer 4 Peer 2Peer 3 ED2K: File Search Reply Peer 1 Search File Results (TCP) Search File Results (UDP) Search File Results message includes one or more file info: file hash client IP and port (optional?) file name

22 Index Server 1 Index Server 3 Index Server 2 Peer 4 Peer 2Peer 3 ED2K: File Downloading 1/3 Peer 1 Get Sources (TCP) Get Sources (UDP) Done if Search File Results message(s) don’t include client IP and port pair(s) or ED2K link is used to start downloading includes: - file hash

23 Index Server 1 Index Server 3 Index Server 2 Peer 4 Peer 2Peer 3 ED2K: File Downloading 2/3 Peer 1 Found Sources (TCP) Found Sources (UDP) Found Sources message includes: file hash address list - client IP and port

24 Index Server 1 Index Server 3 Index Server 2 Peer 4 Peer 2Peer 3 ED2K: File Downloading 3/3 Peer 1 File requests and downloading

25 BitTorrent Overview

26 BitTorrent Centralized network, includes tracker.torrent files Google search for.torrents Legal material available

27 Tracker HTTP Server GET.torrent file Downloader Seed 2 Leecher 1 Seed 1 In.torrent file: file size file name hash of file (SHA1) url of tracker.torrent file BitTorrent: Get.torrent

28 Tracker HTTP Server Seed 2 Leecher 1 Seed 1 BitTorrent: Get Peer List Response-peer list GET-announce Downloader

29 Tracker HTTP Server Downloader Seed 2 Leecher 1 Seed 1 BitTorrent: Query File Pieces GET pieces of file

30 Tracker HTTP Server Leecher 2 Seed 2 Leecher 1 Seed 1 BitTorrent: File Pieces Info about download status pieces of file

31 Tracker HTTP Server Seed 4 Seed 2 Seed 3 Seed 1 BitTorrent: Status Information Info about complete download

32 Skype Overview

33 Skype Skype is a P2P VoIP client developed by the people who did KaZaA Allows its users to place voice calls and send text messages to other users of Skype clients Two types of nodes in the overlay network, ordinary hosts (OH) and super nodes (SN) OH is a Skype application that can be used to place voice calls and send text messages SN is an ordinary host’s end-point on the Skype network Any node with a public IP address having sufficient CPU, memory, and network bandwidth is a candidate to become a SN

34 Skype OH must connect to a SN and must register itself with the Skype login server for a successful login 7 bootstrap super nodes The host cache (HC) is a list of super node IP address and port pairs that OH builds and refreshes regularly HC contains a maximum of 200 entries

35 Skype Network Super Nodes Skype Login Server Message exchange during login

36 Skype Uses its Global Index technology to search for a user Firewall traversal: First UDP, second TCP, third TCP port 80 (HTTP), fourth TCP port 443 (HTTPS) Call signaling is carried always over TCP

37 NAT and Firewall Traversal -If caller is behind port- restricted NAT, call signaling (TCP) is forwarded through a node, which has a public IP address -If either caller or callee or both are behind port- restricted NAT voice traffic (UDP) is forwarded through the same node - If both caller and callee have a public IP address, call signaling (TCP) and voice traffic (UDP) flow directly between them - If both caller and callee are behind port-restricted NAT and UDP- restricted firewall, then signaling traffic and voice traffic is forwarded through another node over TCP


Download ppt "Peer-to-Peer Intro 5.4.2005 Jani & Sami Peltotalo."

Similar presentations


Ads by Google