No Class on Friday There will be NO class on: FRIDAY 1/30/15.

Slides:



Advertisements
Similar presentations
Transport Layer3-1 Transport Overview and UDP. Transport Layer3-2 Goals r Understand transport services m Multiplexing and Demultiplexing m Reliable data.
Advertisements

Introduction 1-1 Chapter 3 Transport Layer Intro and Multiplexing Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley.
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.
Road Map Application basics Web FTP DNS P2P DHT.
Chapter 3: Transport Layer
2: Application Layer P2P applications and Sockets.
Introduction to Transport Layer. Transport Layer: Motivation A B R1 R2 r Recall that NL is responsible for forwarding a packet from one HOST to another.
Transport Layer3-1 Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable data transfer.
Lecture 8 Chapter 3 Transport Layer
CSE 124 Networked Services Fall 2009 B. S. Manoj, Ph.D 11/03/2009CSE 124 Network Services FA 2009 Some of these.
Some slides are in courtesy of J. Kurose and K. Ross Review of Previous Lecture Electronic Mail: SMTP, POP3, IMAP DNS Socket programming with TCP.
8-1 Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable data transfer m flow.
Introduction 1 Lecture 8 Application Layer (DNS, p2p) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 10 Omar Meqdadi Department of Computer Science and Software Engineering University.
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 Layer – Peer-to-peer UIUC CS438: Communication Networks Summer 2014 Fred Douglas Slides: Fred, Kurose&Ross (sometimes edited)
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications  app architectures  app requirements r 2.2 Web and HTTP.
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 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
Data Communications and Computer Networks Chapter 3 CS 3830 Lecture 12 Omar Meqdadi Department of Computer Science and Software Engineering University.
CS 1652 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Jack Lange.
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 All.
Transport Layer 3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Part.
Chapter 3 Transport Layer
Transport Layer3-1 Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable.
Transport Layer1 Ram Dantu (compiled from various text books)
1 Transport Layer Lecture 7 Imran Ahmed University of Management & Technology.
Lecture91 Administrative Things r Return homework # 1 r Review some problems in homework # 1 r Questions about grading? Yona r WebCT for CSE245 is working!
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.
CS 3830 Day 13 Introduction 1-1. Announcements r Quiz 3: Wednesday, Oct 10 r Prog3 due Wednesday, Oct 10 Transport Layer 3-2.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July A.
Lecture 2 Distributed Hash Table
CS 3830 Day 10 Introduction 1-1. Announcements r Quiz #2 this Friday r Program 2 posted yesterday 2: Application Layer 2.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012.
Transport Layer 3-1 Chapter 3 Outline r 3.1 Transport-layer services r 3.2 Multiplexing and demultiplexing r 3.3 Connectionless transport: UDP.
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.
Advance Computer Networks Lecture#06
Chapter 2 Application Layer Application 2-1. Chapter 2: Application layer 2.1 Principles of network applications 2.2 Web and HTTP 2.3 FTP 2.4 Electronic.
MULTIPLEXING/DEMULTIPLEXING, CONNECTIONLESS TRANSPORT.
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.
Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
PEAR TO PEAR PROTOCOL. Pure P2P architecture no always-on server arbitrary end systems directly communicate peers are intermittently connected and change.
Transport Layer3-1 Chapter 3: Transport Layer Our goals: r understand principles behind transport layer services: m multiplexing/demultipl exing m reliable.
Introduction 1-1 source application transport network link physical HtHt HnHn M segment HtHt datagram destination application transport network link physical.
CSEN 404 Transport Layer I Amr El Mougy Lamia Al Badrawy.
II -a: Application Layer II. Application Layer (part b) lectured by Chang-jin Suh Soongsil University, Dep. of Computer Science Tel :
Transport Layer3-1 Transport Layer Never take life seriously. Nobody gets out alive anyway.
05 - P2P applications and Sockets
Introduction to Networks
Server-client vs. P2P: example
Chapter 3 Transport Layer
Introduction to Networks
Part 4: Peer to Peer - P2P Applications
Pure P2P architecture no always-on server
Chapter 2 Application Layer
Transport Layer Our goals:
Presentation transcript:

No Class on Friday There will be NO class on: FRIDAY 1/30/15

EECS340 Final Exam Hi Aleksandar, EECS 340 final exam will be scheduled Wednesday, March 18 from 3-5pm. Regards, Lana

Pure P2P architecture no always-on server arbitrary end systems directly communicate peers are intermittently connected and change IP addresses Three topics: file distribution searching for information case Study: Skype peer-peer 3

File Distribution: Server-Client vs P2P Question : How much time to distribute file from one server to N peers? us: server upload bandwidth Server ui: peer i upload bandwidth u1 d1 u2 d2 us di: peer i download bandwidth File, size F dN Network (with abundant bandwidth) uN 4

File distribution time: server-client server sequentially sends N copies: NF/us time client i takes F/di time to download F u2 u1 d1 d2 us Network (with abundant bandwidth) dN uN = dcs = max { NF/us, F/min(di) } i Time to distribute F to N clients using client/server approach increases linearly in N (for large N) 5

File distribution time: P2P Server server must send one copy: F/us time client i takes F/di time to download NF bits must be downloaded (aggregate) F u2 u1 d1 d2 us Network (with abundant bandwidth) dN uN fastest possible upload rate: us + Sui dP2P = max { F/us, F/min(di) , NF/(us + Sui) } i 6

Server-client vs. P2P: example Client upload rate = u, F/u = 1 hour, us = 10u, dmin ≥ us 7

File distribution: BitTorrent P2P file distribution tracker: tracks peers participating in torrent torrent: group of peers exchanging chunks of a file obtain list of peers trading chunks peer 8

BitTorrent (1) file divided into 256KB chunks. peer joining torrent: has no chunks, but will accumulate them over time registers with tracker to get list of peers, connects to subset of peers (“neighbors”) while downloading, peer uploads chunks to other peers. peers may come and go once peer has entire file, it may (selfishly) leave or (altruistically) remain 9

BitTorrent (2) Pulling Chunks Sending Chunks: tit-for-tat Alice sends chunks to four neighbors currently sending her chunks at the highest rate re-evaluate top 4 every 10 secs every 30 secs: randomly select another peer, starts sending chunks newly chosen peer may join top 4 “optimistically unchoke” Pulling Chunks at any given time, different peers have different subsets of file chunks periodically, a peer (Alice) asks each neighbor for list of chunks that they have. Alice sends requests for her missing chunks rarest first Rarest first: from among the chunks she does not have, the chunks that are the rarest among the neighbors should be asked first. In this way, the rarest data gets distributed first. The top 4 peers are called “unchoked”. Every 30 seconds Alice randomly choose a new trading partner (peer) and initiate trading with that partner. If the 2 peers are happy with the trading, they will remain connected. All other peers below top 5 do not get any data from Alice -- they 10

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 With higher upload rate, can find better trading partners & get file faster! 11

Distributed Hash Table (DHT) DHT: distributed P2P database database has (key, value) pairs; key: ss number; value: human name key: content type; value: IP address peers query DB with key DB returns values that match the key peers can also insert (key, value) peers 12

DHT Identifiers assign integer identifier to each peer in range [0,2n-1]. Each identifier can be represented by n bits. require each key to be an integer in same range. to get integer keys, hash original key. e.g., key = h(“Led Zeppelin IV”) this is why they call it a distributed “hash” table To create integers out of the keys (such as “Led Zeppelin IV”), we will use a hash function that maps each key (e.g., a social security number or “Led Zeppelin IV”) to an integer in the range [0, 2^n -1]. A hash function is a many-to-one function for which two different inputs can have the same output (same integer), but the likelihood is extremely small. 13

How to assign keys to peers? central issue: assigning (key, value) pairs to peers. rule: assign key to the peer that has the closest ID. convention in lecture: closest is the immediate successor of the key. e.g.,: n=4; peers: 1,3,4,5,8,10,12,14; key = 13, then successor peer = 14 key = 15, then successor peer = 1 Given that each peer has an integer identifier and that each key is also an integer identifier n the same range, a natural approach is to assign each (key, value) pair to the peer whose identifier is closest to the key. Suppose that n=4, hence [0,15]. Suppose that there are 8 peers: 1,3,4,5,8,10,12,14 How to insert a (key, value) pair? Find the responsible peer (closest to the key value). But how to find a peer that is closest to the key? 14

Circular DHT (1) 1 3 4 5 8 10 12 15 Each peer is only aware of its immediate successor; e.g., peer 5 knows the IP address and identifier for peer 8 but does not necessarily know anything about any other peers that may be in the DHT. “Overlay network” means that peers form an abstract logical network which resides above “underlay” computer network consisting of physical links, routers, and hosts. In the figure there are 8 nodes and 8 links in the overlay. By default a peer is aware of its predecessor because it is sending the messages. each peer only aware of immediate successor and predecessor. “overlay network” 15

Define closest as closest successor Circular DHT (2) 0001 O(N) messages on avg to resolve query, when there are N peers Who’s resp for key 1110 ? I am 0011 1111 1110 0100 1110 If not responsible – keeps sending the question. If responsible (node 12 in this case), it sends the response directly to the originator. Although each peer is only aware of two neighboring peers, to find the node responsible for a key it takes: N messages in the worst case and N/2 on average. Thus, there is a tradeoff between the # of neighbors each peer has to track and the # of messages that the DHT needs to send to resole a query. Full mesh  1 query Predecessor and successor  N/2 on average. 1110 1100 1110 0101 1110 Define closest as closest successor 1110 1010 1000 16

Circular DHT with Shortcuts 1 3 4 5 8 10 12 15 Who’s resp for key 1110? Keep circular DHT as the foundation, but add “shortcuts” so that each peer keeps track not only of immediate successor ,but also of a relatively small number of shortcut peers scattered around the circle. Example in the figure. When receives a request, a peer sends a request either to the successor or to one of the shortcuts, whichever is closest to the key. each peer keeps track of IP addresses of predecessor, successor, short cuts. reduced from 6 to 2 messages. possible to design shortcuts so O(log N) neighbors, O(log N) messages in query 17

Peer Churn peer 5 abruptly leaves 1 3 4 5 8 10 12 15 To handle peer churn, require each peer to know the IP address of its two successors. Each peer periodically pings its two successors to see if they are still alive. peer 5 abruptly leaves Peer 4 detects; makes 8 its immediate successor; asks 8 who its immediate successor is; makes 8’s immediate successor its second successor. What if peer 13 wants to join? If 13 wants to join: Assumption: knows only about 1’s IP address. It then sends the question: “What will be 13’s predecessor and successor?” Reaches 12 who realizes that it will be predecessor (because its current successor is larger than 13, it is15). Peer 12 then sends this predecessor and successor information to peer 13. 13 can now join by making 15 its successor and by notifying peer 12 that it should change its immediate successor to 13. BitTorrent uses the Kademlia DHT to create a distributed tracker. In BitTorrent, the key is the torrent identifier and the value is the IP address of all the peers currently participating in the torrent. Thus, bu queuring the DHT with a torrent identifier, a newly arriving peer can query it for a list of other peers in the torrent. 18

P2P Case study: Skype inherently P2P: pairs of users communicate. Skype clients (SC) inherently P2P: pairs of users communicate. proprietary application-layer protocol (inferred via reverse engineering) hierarchical overlay with SNs Index maps usernames to IP addresses; distributed over SNs Skype login server Supernode (SN) Skype employs P2P techniques for 2 other important functions, namely, for user location and for NAT traversal. 19

Peers as relays problem when both Alice and Bob are behind “NATs”. NAT prevents an outside peer from initiating a call to insider peer solution: using Alice’s and Bob’s SNs, relay is chosen each peer initiates session with relay. peers can now communicate through NATs via relay When Alice and Bob sign in, they open a connection to their relays. Once Alice calls Bob, the call is routed to Bob’s relay, and the relay then forwards the request to Bob. 20

Transport Layer Our goals: understand principles behind transport layer services: multiplexing/demultiplexing reliable data transfer flow control congestion control learn about transport layer protocols in the Internet: UDP: connectionless transport TCP: connection-oriented transport TCP congestion control

Outline Transport-layer services Multiplexing and demultiplexing Connectionless transport: UDP

Transport services and protocols provide logical communication between app processes running on different hosts transport protocols run in end systems send side: breaks app messages into segments, passes to network layer rcv side: reassembles segments into messages, passes to app layer more than one transport protocol available to apps Internet: TCP and UDP application transport network data link physical network data link physical network data link physical network data link physical logical end-end transport network data link physical network data link physical application transport network data link physical

Transport vs. network layer Household analogy: 12 kids sending letters to 12 kids processes = kids app messages = letters in envelopes hosts = houses transport protocol = parents network-layer protocol = postal service network layer: logical communication between hosts transport layer: logical communication between processes relies on, enhances, network layer services