Presentation is loading. Please wait.

Presentation is loading. Please wait.

By Shobana Padmanabhan Sep 12, 2007 CSE 473 Class #4: P2P Section 2.6 of textbook (some pictures here are from the book)

Similar presentations


Presentation on theme: "By Shobana Padmanabhan Sep 12, 2007 CSE 473 Class #4: P2P Section 2.6 of textbook (some pictures here are from the book)"— Presentation transcript:

1 By Shobana Padmanabhan Sep 12, 2007 CSE 473 Class #4: P2P Section 2.6 of textbook (some pictures here are from the book)

2 2 Recap Links Packet switched networks Store-and-forward routing Delays –d prop = distance/ propagation speed –d tran = L /R = packet size/ capacity –d q –d proc IPv4 address: 32 bits –172.16.2.15 (roach.int.cec.wustl.edu) –172.16.2.8 (butterfly.int.cec.wustl.edu) 10101100 00010000 00000010 00001000 –Subnet mask 172.16.2.8/24 –First 24 bits constitute “prefix”

3 3 Longest-prefix matching Destination addressLink to follow 172.16.2.15/32Link1 172.16.2.15/24Link2 172.16.2.8/16Link3

4 4 Today’s lecture Application layer –Applications don’t see links –Client-server or P2P Today, we focus on P2P

5 5 Applications Gmail New mail: “Watch Federer video. Tell Cathy, Denis, Ed, and Frank also.” request response Internet

6 6 Applications Gmail request response Internet Server sends 5 copies If 50 requests, 50 copies; 5 million requests, 5 million copies!

7 7 Client-server Suppose –File is F bits –N users –Upload rate of server’s access link is u s –Upload rate of user i ’s access link is u i –Download rate of user i ’s access link is d i Time to distribute a copy to all users –NF/u s a A user may have very low download rate –Max {NF/u s, F/d min } where d min = min {d 1,d 2,…d N }

8 8 Client-server Other problems –Significant reliance on always-on servers –Multiple copies, along with other traffic, can cause congestion on links Longest-prefix matching is not sensitive to traffic load Queuing delays at routers –Potential dropping of packets (i.e.) data loss Peer-to-peer architecture addresses these…

9 9 Peer-to-peer (P2P) Pairs of computers, called peers, communicate directly. Source: wikipedia.org Server sends file once. Peers redistribute file chunks using their upload capacity. –Max {F/u s, F/d min, NF/(u s +u 1 +u 2 +…+u N )}

10 10 Client-server vs. P2P

11 11 BitTorrent P2p protocol for file distribution

12 12 BitTorrent 1.When a peer (Alice) joins a torrent, she registers with a tracker. –Periodically, informs tracker of its presence. 2.Tracker sends Alice IP addresses of n random participating peers. 3.Alice tries to establish connection with them all. –All connected peers are neighboring peers. These peers may leave and others may join over time. 4.Periodically, Alice asks each neighbor for their list of chunks –Alice then requests chunks that she wants. 5.Important decisions Alice makes are: –Request “rarest first” chunks –“Trading algo” to determine neighbors to whom to send –Eliminates “free-riding”

13 13 BitTorrent Estimated BitTorrent traffic is 18 - 35% BitTorrent does not offer users anonymity –obtaining IP addresses exposes users with insecure systems to attacks Peers may leave selfishly after downloading a file Users with low upload capacity may see slower download speeds until they upload more –Some trackers exempt dial-up users Source: wikipedia.org

14 14 Indexing Map info to locations 1.Centralized index 2.Query flooding 3.Hierarchical overlay 4.DHTs (Distributed Hash Table)

15 15 1. Centralized index

16 16 2. Query flooding index Limited-scope query flooding Handling of peers joining and leaving overlay –Bootstrap, maybe with a tracker The new peer tries to setup TCP connections “Ping”, “pong”

17 17 3. Hierarchical overlay index “Super” peers maintain index for files of their children Super peers interconnect themselves

18 18 4. DHT index A fully decentralized index Allows users to determine all locations of a file –Without generating excessive traffic

19 19 Skype P2P Internet telephony –P2P techniques for also user location Proprietary protocol; all packet transmissions encrypted Nodes organized into hierarchical overlay net –Each peer classified as super or ordinary Index to map username to current IP address –Distributed over super peers

20 Backup

21 21 Longest-prefix matching // insert sorted if (new_mask == curr_mask) { if (new_destAddr == curr_destAddr) { //entry already exists return 0; } return (new_destAddr > curr_destAddr) ? 1 : -1; } return (new_mask > curr_mask) ? 1 : -1; // if return value > 0, insert above current entry


Download ppt "By Shobana Padmanabhan Sep 12, 2007 CSE 473 Class #4: P2P Section 2.6 of textbook (some pictures here are from the book)"

Similar presentations


Ads by Google