Application Layer – Peer-to-peer UIUC CS438: Communication Networks Summer 2014 Fred Douglas Slides: Fred, Kurose&Ross (sometimes edited)

Slides:



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

Peer-to-Peer Systems Chapter 25. What is Peer-to-Peer (P2P)? Napster? Gnutella? Most people think of P2P as music sharing.
The BitTorrent Protocol. What is BitTorrent?  Efficient content distribution system using file swarming. Does not perform all the functions of a typical.
Clayton Sullivan PEER-TO-PEER NETWORKS. INTRODUCTION What is a Peer-To-Peer Network A Peer Application Overlay Network Network Architecture and System.
Kademlia: A Peer-to-peer Information System Based on the XOR Metric Petar Mayamounkov David Mazières A few slides are taken from the authors’ original.
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.
Chord: A scalable peer-to- peer lookup service for Internet applications Ion Stoica, Robert Morris, David Karger, M. Frans Kaashock, Hari Balakrishnan.
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.
Chord A Scalable Peer-to-peer Lookup Service for Internet Applications
Common approach 1. Define space: assign random ID (160-bit) to each node and key 2. Define a metric topology in this space,  that is, the space of keys.
CompSci 356: Computer Network Architectures Lecture 21: Content Distribution Chapter 9.4 Xiaowei Yang
Road Map Application basics Web FTP DNS P2P DHT.
No Class on Friday There will be NO class on: FRIDAY 1/30/15.
Peer to Peer File Sharing Huseyin Ozgur TAN. What is Peer-to-Peer?  Every node is designed to(but may not by user choice) provide some service that helps.
Topics in Reliable Distributed Systems Lecture 2, Fall Dr. Idit Keidar.
Introduction to Peer-to-Peer (P2P) Systems Gabi Kliot - Computer Science Department, Technion Concurrent and Distributed Computing Course 28/06/2006 The.
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.
1 CS 194: Distributed Systems Distributed Hash Tables Scott Shenker and Ion Stoica Computer Science Division Department of Electrical Engineering and Computer.
Peer-to-Peer Networks Slides largely adopted from Ion Stoica’s lecture at UCB.
1CS 6401 Peer-to-Peer Networks Outline Overview Gnutella Structured Overlays BitTorrent.
Introduction 1 Lecture 8 Application Layer (DNS, p2p) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
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.
1 Lecture05: Application layer r Principles of network applications r DNS r P2P and DHT.
By Shobana Padmanabhan Sep 12, 2007 CSE 473 Class #4: P2P Section 2.6 of textbook (some pictures here are from the book)
Application Layer2-1 Chapter 2: outline 2.1 principles of network applications – app architectures – app requirements 2.2 Web and HTTP 2.3 FTP 2.4 electronic.
Content Distribution March 6, : Application Layer1.
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
Computer Networks CSE 434 Fall 2009 Sandeep K. S. Gupta Arizona State University Research Experience.
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,
P2P Networking and Content Distribution
Chord: A Scalable Peer-to-peer Lookup Protocol for Internet Applications Xiaozhou Li COS 461: Computer Networks (precept 04/06/12) Princeton University.
1 Distributed Hash Tables (DHTs) Lars Jørgen Lillehovde Jo Grimstad Bang Distributed Hash Tables (DHTs)
Content Distribution March 2, : Application Layer1.
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.
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.
1 Secure Peer-to-Peer File Sharing Frans Kaashoek, David Karger, Robert Morris, Ion Stoica, Hari Balakrishnan MIT Laboratory.
2: Application Layer 1 Chapter 2 Application Layer Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April.
Computer Networks CSE 434 Fall 2009 Sandeep K. S. Gupta Arizona State University Research Experience.
ADVANCED COMPUTER NETWORKS Peer-Peer (P2P) Networks 1.
LOOKING UP DATA IN P2P SYSTEMS Hari Balakrishnan M. Frans Kaashoek David Karger Robert Morris Ion Stoica MIT LCS.
INTERNET TECHNOLOGIES Week 10 Peer to Peer Paradigm 1.
No Class on Friday There will be NO class on: FRIDAY 1/29/15 1.
2: Application Layer 1 CMPT 371 Data Communications and Networking Chapter 2 Application Layer - 2.
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.
Chord: A Scalable Peer-to-Peer Lookup Service for Internet Applications * CS587x Lecture Department of Computer Science Iowa State University *I. Stoica,
CS Spring 2010 CS 414 – Multimedia Systems Design Lecture 24 – Introduction to Peer-to-Peer (P2P) Systems Klara Nahrstedt (presented by Long Vu)
05 - P2P applications and Sockets
An example of peer-to-peer application
Server-client vs. P2P: example
EE 122: Peer-to-Peer (P2P) Networks
Part 4: Peer to Peer - P2P Applications
The BitTorrent Protocol
Chapter 2 Application Layer
Pure P2P architecture no always-on server
Chapter 2 Application Layer
Kademlia: A Peer-to-peer Information System Based on the XOR Metric
#02 Peer to Peer Networking
Presentation transcript:

Application Layer – Peer-to-peer UIUC CS438: Communication Networks Summer 2014 Fred Douglas Slides: Fred, Kurose&Ross (sometimes edited)

A Step Back Today, everything is megacorps: Google etc. You

A Step Back What, fundamentally, does the internet do? “Internet” “End host” mobile network global ISP regional ISP home network institutional network

“Pure” P2P architecture  no always-on server  arbitrary end systems directly communicate  peers are intermittently connected and change IP addresses examples:  File distribution (BitTorrent) Can be pure  File distribution (Freenet)  VoIP (Skype) Registration + authentication  Many games Lobby, matchmaking

Motivation: File distribution Question: how much time to distribute file (size F) from one server to N peers?  …the traditional way (e.g. from an HTTP server)  …if peers also upload to each other usus uNuN dNdN server network (with abundant bandwidth) file, size F u s : server upload capacity u i : peer i upload capacity d i : peer i download capacity u2u2 d2d2 u1u1 d1d1 didi uiui

Client-server vs. P2P: example

P2P file distribution: BitTorrent tracker: tracks peers participating in torrent torrent: group of peers exchanging chunks of a file  file divided into fixed size chunks [list of peers]

 peer joining torrent:  Starts with no chunks; can only download  Can pass on any chunk it gets  Eventually completes the file, and Becomes a “seeder”, or Leaves  During download P2P file distribution: BitTorrent  while downloading, peer uploads chunks to other peers  peer may change peers with whom it exchanges chunks  churn: peers may come and go  once peer has entire file, it may (selfishly) leave or (altruistically) remain in torrent

BitTorrent: requesting, sending file chunks requesting chunks:  at any given time, different peers have different subsets of file chunks  periodically, Alice asks each peer for list of chunks that they have  Alice requests missing chunks from peers, rarest first sending chunks: tit-for-tat  Alice sends chunks to those four peers currently sending her chunks at highest rate  other peers are choked by Alice (do not receive chunks from her)  re-evaluate top 4 every10 secs  every 30 secs: randomly select another peer, starts sending chunks  “optimistically unchoke” this peer  newly chosen peer may join top 4

BitTorrent: tit-for-tat (1) Alice “optimistically unchokes” Bob (2) Alice becomes one of Bob’s top-four providers; Bob reciprocates (3) Bob becomes one of Alice’s top-four providers higher upload rate: find better trading partners, get file faster !

 Distribute (key, value) pairs over millions of peers  pairs are evenly distributed over peers  Any peer can query database with a key  database returns value for the key  To resolve query, small number of messages exchanged among peers  Each peer only knows about a small number of other peers  Robust to peers coming and going (churn) Distributed Hash Table (DHT)

Assign key-value pairs to peers  rule: assign key-value pair to the peer that has the closest ID.  convention: closest is the immediate successor of the key.  e.g., ID space {0,1,2,3,…,63}  suppose 8 peers: 1,12,13,25,32,40,48,60  If key = 51, then assigned to peer 60  If key = 60, then assigned to peer 60  If key = 61, then assigned to peer 1

Silly Strawman Circular DHT each peer only aware of immediate successor and predecessor. (Note: circular DHTs aren’t the only way; e.g. Kademlia) “overlay network”

What is the value associated with key 53 ? value O(N) messages on avgerage to resolve query, when there are N peers Resolving a query

Circular DHT with shortcuts (Chord) each peer keeps track of IP addresses of predecessor, successor, short cuts. reduced from 6 to 3 messages. possible to design shortcuts with O(log N) neighbors, O(log N) messages in query What is the value for key 53 value

Chord Me Finger

Peer churn example: peer 5 abruptly leaves handling peer churn:  peers may come and go (churn)  each peer knows address of its two successors  each peer periodically pings its two successors to check aliveness  if immediate successor leaves, choose next successor as new immediate successor

Peer churn example: peer 5 abruptly leaves  peer 4 detects peer 5’s departure; makes 8 its immediate successor  4 asks 8 who its immediate successor is; makes 8’s immediate successor its second successor handling peer churn:  peers may come and go (churn)  each peer knows address of its two successors  each peer periodically pings its two successors to check aliveness  if immediate successor leaves, choose next successor as new immediate successor

BitTorrent as true P2P Traditional BitTorrent – Get peers from tracker – Trackers identified in.torrent file –.torrent file hosted on a centralized torrent search engine site Fully P2P BitTorrent – Get peers from DHT, and direct exchange – Magnet link provides file hash Look the hash up in DHT – Magnet links: just text Search engines, forums, anonymous message boards, …

P2P Motivation – Revisited Client-server dominates the mainstream. Why? – Performance Economies of scale Round trip times (Mass file distribution is a rare exception) So, why peer-to-peer? – Avoid single points of failure Technological …and social  Robustness, Survivability OR  Power to the people

Optional

Freenet Pure P2P document store – Also forums implemented on top Goals – Robustness Node failures Censorship – Anonymity

Freenet Design Two components: storage, lookup Storage – All nodes provide ~10+ GB storage to the network – All content is encrypted: not visible to storer – Storer never has any idea what it’s storing Lookup – Key-based routing, like a DHT – Lookup path construction: always take the hop closest to the target value – Data retrieval and insertion are both “lookups” – Data retrieval

Freenet Lookup First, probe for a path Receive (or send) data once path is built Nodes relaying the data can cache it Data lookup  caching means popular items are replicated, unpopular items forgotten

Freenet Topology Original design – Start with connections to some bootstrap nodes – Randomly add nodes in lookup paths to neighbors Darknet – Only connect to nodes whose identity the user knows and trusts – Relies on social network dynamics to give the necessary fast mixing / “small world” property