Marina Papatriantafilou – Overlays and peer-to-peer applications Based on the book Computer Networking: A Top Down Approach, Jim Kurose, Keith Ross, Addison-Wesley.

Slides:



Advertisements
Similar presentations
P2P data retrieval DHT (Distributed Hash Tables) Partially based on Hellerstein’s presentation at VLDB2004.
Advertisements

Peer to Peer and Distributed Hash Tables
Course on Computer Communication and Networks Lecture 10 Chapter 2; peer-to-peer applications (and network overlays) EDA344/DIT 420, CTH/GU.
Clayton Sullivan PEER-TO-PEER NETWORKS. INTRODUCTION What is a Peer-To-Peer Network A Peer Application Overlay Network Network Architecture and System.
Chapter 2 Application Layer Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April A note on the use.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Peer-to-Peer Networking Marina Papatriantafilou CSE Department, Distributed Computing and Systems group Ack: Many of the slides are adaptation of slides.
No Class on Friday There will be NO class on: FRIDAY 1/30/15.
1 Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications Robert Morris Ion Stoica, David Karger, M. Frans Kaashoek, Hari Balakrishnan.
Cis e-commerce -- lecture #6: Content Distribution Networks and P2P (based on notes from Dr Peter McBurney © )
Spotlighting Decentralized P2P File Sharing Archie Kuo and Ethan Le Department of Computer Science San Jose State University.
2: Application Layer P2P applications and Sockets.
Introduction to Peer-to-Peer (P2P) Systems Gabi Kliot - Computer Science Department, Technion Concurrent and Distributed Computing Course 28/06/2006 The.
Efficient Content Location Using Interest-based Locality in Peer-to-Peer Systems Presented by: Lin Wing Kai.
Distributed Lookup Systems
Chord-over-Chord Overlay Sudhindra Rao Ph.D Qualifier Exam Department of ECECS.
CSE 124 Networked Services Fall 2009 B. S. Manoj, Ph.D 11/03/2009CSE 124 Network Services FA 2009 Some of these.
Topics in Reliable Distributed Systems Fall Dr. Idit Keidar.
Peer To Peer Distributed Systems Pete Keleher. Why Distributed Systems? l Aggregate resources! –memory –disk –CPU cycles l Proximity to physical stuff.
1CS 6401 Peer-to-Peer Networks Outline Overview Gnutella Structured Overlays BitTorrent.
Computer Communications Peer to Peer networking Ack: Many of the slides are adaptations of slides by authors in the bibliography section.
CS 640: Introduction to Computer Networks Yu-Chi Lai Lecture 18 - Peer-to-Peer.
CSE 461 University of Washington1 Topic Peer-to-peer content delivery – Runs without dedicated infrastructure – BitTorrent as an example Peer.
Introduction to Peer-to-Peer Networks. What is a P2P network Uses the vast resource of the machines at the edge of the Internet to build a network that.
P2P File Sharing Systems
INTRODUCTION TO PEER TO PEER NETWORKS Z.M. Joseph CSE 6392 – DB Exploration Spring 2006 CSE, UT Arlington.
1 Napster & Gnutella An Overview. 2 About Napster Distributed application allowing users to search and exchange MP3 files. Written by Shawn Fanning in.
By Shobana Padmanabhan Sep 12, 2007 CSE 473 Class #4: P2P Section 2.6 of textbook (some pictures here are from the book)
Application Layer – Peer-to-peer UIUC CS438: Communication Networks Summer 2014 Fred Douglas Slides: Fred, Kurose&Ross (sometimes edited)
Peer-to-Peer Overlay Networks. Outline Overview of P2P overlay networks Applications of overlay networks Classification of overlay networks – Structured.
1 Telematica di Base Applicazioni P2P. 2 The Peer-to-Peer System Architecture  peer-to-peer is a network architecture where computer resources and services.
1 P2P Computing. 2 What is P2P? Server-Client model.
Introduction to Peer-to-Peer Networks. What is a P2P network A P2P network is a large distributed system. It uses the vast resource of PCs distributed.
Content Overlays (Nick Feamster). 2 Content Overlays Distributed content storage and retrieval Two primary approaches: –Structured overlay –Unstructured.
Introduction of P2P systems
Peer-to-Peer Networks University of Jordan. Server/Client Model What?
Chapter 2: Application layer
2: Application Layer1 Chapter 2: Application layer r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail  SMTP,
2: Application Layer1 Chapter 2 outline r 2.1 Principles of app layer protocols r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail r 2.5 DNS r 2.6 Socket.
Chord: A Scalable Peer-to-peer Lookup Protocol for Internet Applications Xiaozhou Li COS 461: Computer Networks (precept 04/06/12) Princeton University.
Network Computing Laboratory Scalable File Sharing System Using Distributed Hash Table Idea Proposal April 14, 2005 Presentation by Jaesun Han.
1 Slides from Richard Yang with minor modification Peer-to-Peer Systems: DHT and Swarming.
Super-peer Network. Motivation: Search in P2P Centralised (Napster) Flooding (Gnutella)  Essentially a breadth-first search using TTLs Distributed Hash.
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
1 Peer-to-Peer Systems r Application-layer architectures r Case study: BitTorrent r P2P Search and Distributed Hash Table (DHT)
2: Application Layer1 Chapter 2: Application layer r 2.1 Principles of network applications  app architectures  app requirements r 2.2 Web and HTTP r.
SIGCOMM 2001 Lecture slides by Dr. Yingwu Zhu Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications.
Lecture 2 Distributed Hash Table
1 Peer-to-Peer Technologies Seminar by: Kunal Goswami (05IT6006) School of Information Technology Guided by: Prof. C.R.Mandal, School of Information Technology.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
CS 640: Introduction to Computer Networks Aditya Akella Lecture 24 - Peer-to-Peer.
Hui Zhang, Fall Computer Networking CDN and P2P.
ADVANCED COMPUTER NETWORKS Peer-Peer (P2P) Networks 1.
Algorithms and Techniques in Structured Scalable Peer-to-Peer Networks
LOOKING UP DATA IN P2P SYSTEMS Hari Balakrishnan M. Frans Kaashoek David Karger Robert Morris Ion Stoica MIT LCS.
CS Spring 2014 CS 414 – Multimedia Systems Design Lecture 37 – Introduction to P2P (Part 1) Klara Nahrstedt.
Two Peer-to-Peer Networking Approaches Ken Calvert Net Seminar, 23 October 2001 Note: Many slides “borrowed” from S. Ratnasamy’s Qualifying Exam talk.
INTERNET TECHNOLOGIES Week 10 Peer to Peer Paradigm 1.
P2P Search COP6731 Advanced Database Systems. P2P Computing  Powerful personal computer Share computing resources P2P Computing  Advantages: Shared.
P2P Search COP P2P Search Techniques Centralized P2P systems  e.g. Napster, Decentralized & unstructured P2P systems  e.g. Gnutella.
PEAR TO PEAR PROTOCOL. Pure P2P architecture no always-on server arbitrary end systems directly communicate peers are intermittently connected and change.
CS Spring 2010 CS 414 – Multimedia Systems Design Lecture 24 – Introduction to Peer-to-Peer (P2P) Systems Klara Nahrstedt (presented by Long Vu)
Course on Computer Communication and Networks Lecture 11 Continuously evolving Internet-working Part 1: p2p networking, media streaming, CDN (TBC in.
An example of peer-to-peer application
BitTorrent Vs Gnutella.
مظفر بگ محمدی دانشگاه ایلام
Part 4: Peer to Peer - P2P Applications
Pure P2P architecture no always-on server
Chapter 2 Application Layer
Presentation transcript:

Marina Papatriantafilou – Overlays and peer-to-peer applications Based on the book Computer Networking: A Top Down Approach, Jim Kurose, Keith Ross, Addison-Wesley. Course on Computer Communication and Networks Lecture 14 partB Chapter 2.6; peer-to-peer applications (and network overlays) EDA344/DIT 420, CTH/GU 1

Marina Papatriantafilou – Overlays and peer-to-peer applications Overlay: a network implemented on top of a network Why? What to do with this? Network overlays Recall: applications can deal with needs of multimedia traffic They actually do more for sharing edge of the network with peer-to-peer (P2P) overlays

Marina Papatriantafilou – Overlays and peer-to-peer applications Application Layer 2-3 Pure P2P architecture no always-on server arbitrary end systems directly communicate peers are intermittently connected and change IP addresses examples: – file distribution/sharing (BitTorrent, …) – Streaming (KanKan) – VoIP (Skype)

Marina Papatriantafilou – Overlays and peer-to-peer applications file-sharing peer-to-peer (p2p) applications: preliminaries Background: Common Primitives in file-sharing p2p apps: Join: how do I begin participating? Publish: how do I advertise my file? Search: how to I find a file/service? Fetch: how to I retrieve a file/use service? 4

Marina Papatriantafilou – Overlays and peer-to-peer applications Roadmap 3a-5 First generation in p2p: file sharing/lookup Centralized Database: single directory – Napster Query Flooding – Gnutella Hierarchical Query Flooding – KaZaA Structured Overlays – DHT Second generation in p2p ….

Marina Papatriantafilou – Overlays and peer-to-peer applications P2P: centralized directory original “Napster” design (1999, S. Fanning) 1) when peer connects, it informs central server: – IP address, content 2) Alice queries directory server for “Boulevard of Broken Dreams” 3) Alice requests file from Bob 6 centralized directory server peers Alice Bob Q: What is p2p in this? File transfer: HTTP

Marina Papatriantafilou – Overlays and peer-to-peer applications Roadmap 3a-7 First generation in p2p: file sharing/lookup Centralized Database: single directory – Napster Query Flooding – Gnutella Hierarchical Query Flooding – KaZaA Structured Overlays – DHT Second generation in p2p ….

Marina Papatriantafilou – Overlays and peer-to-peer applications Gnutella: protocol 8 Query QueryHit Query QueryHit Query Query Hit File transfer: HTTP Query Flooding: Join: on startup, client connects to a few other nodes (learn from bootstrap-node); these become its “neighbors” (overlay!! ) Publish: no need Search: ask “neighbors”, who ask their neighbors, and so on... when/if found, reply to sender. Fetch: get the file directly from peer

Marina Papatriantafilou – Overlays and peer-to-peer applications Gnutella: Search 9 I have file A. Where is file A? Query Reply Q: Compare with Napster Request/Fetch

Marina Papatriantafilou – Overlays and peer-to-peer applications Discussion +, -? Gnutella: Pros: – Simple – Fully de-centralized – Search cost distributed Cons: – Search scope is O(peers, items) – Search time is O(???) 10 Napster  Pros:  Simple  Search scope is O(1)  Cons:  Server maintains O(peers,items) State  Server performance bottleneck  Single point of failure

Marina Papatriantafilou – Overlays and peer-to-peer applications 11 Synch questions: – Edge is not a physical link E.g. edge between peer X and Y if they know each-other’s IP addresses or there’s a TCP connection – Used for supporting the search operation (aka routing in p2p networks) how are the ”neighbors” connected? what is the overlay here useful for?

Marina Papatriantafilou – Overlays and peer-to-peer applications Roadmap 3a-12 First generation in p2p: file sharing/lookup Centralized Database: single directory – Napster Query Flooding – Gnutella Hierarchical Query Flooding : some directory structure – KaZaA Structured Overlays – DHT Second generation in p2p ….

Marina Papatriantafilou – Overlays and peer-to-peer applications KaZaA: join, publish 13 I have X! Publish insert(X, ) “Super Nodes” “Smart” Query Flooding: Join: on startup, client contacts a “supernode”... may at some point become one itself Publish: send list of files to supernode

Marina Papatriantafilou – Overlays and peer-to-peer applications KaZaA: Search 14 Where is file A? Query search(A) --> search(A) --> Replies “Super Nodes” Q: Compare with Napster, Gnutella (publishing, searching, anything else) “ Smart” Query Flooding: Search: send query to supernode, supernodes flood query amongst themselves. Fetch: get the file directly from peer(s); can fetch simultaneously from multiple peers

Marina Papatriantafilou – Overlays and peer-to-peer applications KaZaA: Discussion Pros: – Tries to balance between search overhead and space needs (trading-off Napster’s & Gnutella’s extremes) – Tries to take into account node heterogeneity: Peer’s Resources (eg bandwidth) Cons: – No real guarantees on search scope or search time – Super-peers may “serve” a lot! P2P architecture used by Skype, Joost (communication, video distribution p2p systems) 15

Marina Papatriantafilou – Overlays and peer-to-peer applications Roadmap 3a-16 First generation in p2p: file sharing/lookup Centralized Database: single directory – Napster Query Flooding – Gnutella Hierarchical Query Flooding – KaZaA Structured Overlays – Combine database+distributed system know-how Second generation in p2p ….

Marina Papatriantafilou – Overlays and peer-to-peer applications 17 Problem from this perspective How to find data in a distributed file sharing system? (aka “routing” to the data, i.e. content-oriented routing) How to do Lookup? Internet Publisher Key=“LetItBe” Value=MP3 data Lookup(“LetItBe”) N1N1 N2N2 N3N3 N5N5 N4N4 Client ?

Marina Papatriantafilou – Overlays and peer-to-peer applications 18 Centralized Solution O(peers,items) state at server, O(1) at client O(1) search communication overhead Single point of failure Internet Publisher Key=“LetItBe” Value=MP3 data Lookup(“LetItBe”) N1N1 N2N2 N3N3 N5N5 N4N4 Client DB Central server (Napster)

Marina Papatriantafilou – Overlays and peer-to-peer applications 19 Distributed Solution O(1) state per node Worst case O(peers, items) complexity per lookup Internet Publisher Key=“LetItBe” Value=MP3 data Lookup(“LetItBe”) N1N1 N2N2 N3N3 N5N5 N4N4 Client Flooding (Gnutella, etc.)

Marina Papatriantafilou – Overlays and peer-to-peer applications balance the update/lookup complexity.. Abstraction: a lookup data structure (distributed “hash-table” DHT) : insert(key, item); item = get(key); 20 Distributed Solution (with some more structure? In-between the two?) Internet Publisher Key=“LetItBe” Value=MP3 data Lookup(“LetItBe”) N1N1 N2N2 N3N3 N5N5 N4N4 Client

Marina Papatriantafilou – Overlays and peer-to-peer applications (Recalling hash tables) figure source: wikipedia; "Hash table SP" by Jorge Stolfi - Own work. Licensed under CC BY-SA 3.0 via Commons -

Marina Papatriantafilou – Overlays and peer-to-peer applications 22 Upon being queried: ”I do not know DFCD3454 but can ask some Neighbour/s in the DHT” Implementation: nodes form an overlay (a distributed data structure) eg. Ring, Tree, cube Hash function maps entries to nodes (insert) Nodes-overlay has structure (Distributed Hash Table); using it, do: Lookup/search: find the node responsible for item; that one knows where the item is Distributed Hash Tables (DHT) figure source: wikipedia

Marina Papatriantafilou – Overlays and peer-to-peer applications 23 Distributed-Hash-Table-Based p2p sharing Internet Publisher Key=“LetItBe” Value=MP3 data Lookup(“LetItBe”) N1N1 N2N2 N3N3 N5N5 N4N4 Client Join: – get connected in the overlay through info from bootstrap-node & using the specific DHT algorithm (eg Chord) – Start maintaining of files that you are responsible for (following the hash function) – NOTE: upon leaving DHT needs restructuring! Publish: tell which files you have, to the peers that will be responsible for them (according to the hash function) Search: ask the appropriate neighbour, who either is responsible for the searched file or will ask the next appropriate neighbor, and so on; guaranteed search time; commonly in O(logNodes) Fetch: get the file directly from peer Challenges [cf related of notes]: Keep the hop count (asking chain) small Keep the routing tables (#neighbours) “right size” Stay robust despite rapid changes in membership (churn)

Marina Papatriantafilou – Overlays and peer-to-peer applications Who’s responsible for key 1110 ? I am O(N) messages on avgerage to resolve query, when there are N peers e.g. Circular DHT (1)

Marina Papatriantafilou – Overlays and peer-to-peer applications Circular DHT with shortcuts Here: reduced from 6 to 2 messages. possible to design shortcuts so O(log N) neighbors, O(log N) messages in query Who’s responsible for key 1110? Application 2-25

Marina Papatriantafilou – Overlays and peer-to-peer applications Roadmap 3a-26 First generation in p2p: file sharing/lookup Centralized Database: single directory – Napster Query Flooding – Gnutella Hierarchical Query Flooding – KaZaA Structured Overlays – DHT Second generation in p2p …. Swarming – BitTorrent, Avalanche, …

Marina Papatriantafilou – Overlays and peer-to-peer applications BitTorrent: Next generation fetching Key Motivation: – Popularity exhibits temporal locality (Flash Crowds) – Can bring file “provider” to “its knees” Idea: Focused on Efficient Fetching, not Searching: – Files are “chopped” in chunks, fetching is done from many sources – Overlay: nodes “hold hands” with those who share (send chunks) at similar rates Method used by publishers to distribute software, other large files 27

Marina Papatriantafilou – Overlays and peer-to-peer applications BitTorrent: Overview Swarming: Join: contact some server, aka “tracker” get a list of peers. Publish: can run a tracker server. Search: Out-of-band. E.g., use search-engine, some DHT, etc to find a tracker for the file you want. Get list of peers to contact for assembling the file in chunks Fetch: Download chunks of the file from several of your peers. Upload chunks you have to them. 28 tracker: tracks peers participating in torrent obtain list of peers trading chunks peer torrent: group of peers exchanging chunks of a file

Marina Papatriantafilou – Overlays and peer-to-peer applications File distribution: BitTorrent 29 tracker: tracks peers participating in torrent obtain list of peers trading chunks peer Peer joining torrent: – has no chunks, but will accumulate over time – gets list of peers from tracker, connects to subset of peers (“neighbors”) who share at similar rates (tit-for- tat) while downloading, peer uploads chunks to other peers. once peer has entire file, it may (selfishly) leave or (altruistically) remain torrent: group of peers exchanging chunks of a file

Marina Papatriantafilou – Overlays and peer-to-peer applications Roadmap 3a-30 First generation in p2p: file sharing/lookup Centralized Database: single directory – Napster Query Flooding – Gnutella Hierarchical Query Flooding – KaZaA Structured Overlays – DHT Second generation in p2p …. Swarming

Marina Papatriantafilou – Overlays and peer-to-peer applications Reading instructions KuroseRoss book: chapter 2.6 for Further Study, optional Aberer’s coursenotes and references therein – – df df Regarding fair sharing in p2p systems – Incentives build Robustness in BitTorrent, Bram Cohen. Workshop on Economics of Peer-to-Peer Systems, Incentives build Robustness in BitTorrent – Do incentives build robustness in BitTorrent? Michael Piatek, Tomas Isdal, Thomas Anderson, Arvind Krishnamurthy and Arun Venkataramani, NSDI 2007 Regarding other applications in p2p sharing, eg Dissemination and media streaming – J. Mundinger, R. R. Weber and G. Weiss. Optimal Scheduling of Peer-to-Peer File Dissemination. Journal of Scheduling, Volume 11, Issue 2, [arXiv] [JoS]arXivJoS – Christos Gkantsidis and Pablo Rodriguez, Network Coding for Large Scale Content Distribution, in IEEE INFOCOM, March 2005 (Avalanche swarming: combining p2p + media streaming)Network Coding for Large Scale Content Distribution Pointers to some work by the group Georgiadis, G.; Papatriantafilou, M.: Overlays with preferences: Approximation algorithms for matching with preference lists. IEEE IPDPS 2010 Zhang Fu, Marina Papatriantafilou: Off the Wall: Lightweight Distributed Filtering to Mitigate Distributed Denial of Service Attacks. SRDS 2012: (builds on router-overlays) 3-31