CMSC 332 Computer Networks P2P and Sockets

Similar documents
Chapter 2: Application layer

CSC 4900 Computer Networks: P2P and Sockets

Application Layer: P2P File Distribution

CC451 Computer Networks

Last Lecture SMTP. SUNY at Buffalo; CSE 489/589 Modern Networking Concepts; Fall 2010; Instructor: Hung Q. Ngo 1

CS 3516: Advanced Computer Networks

Application-Layer Protocols Peer-to-Peer Systems, Media Streaming & Content Delivery Networks

Peer-to-Peer Applications Reading: 9.4

Lecture 8: Application Layer P2P Applications and DHTs

CS 3516: Computer Networks

Unit 8 Peer-to-Peer Networking

Peer-to-Peer Networks

Computer Networking Introduction

internet technologies and standards

Internet Protocol Stack! Principles of Network Applications! Some Network Apps" (and Their Protocols)! Application-Layer Protocols! Our goals:!

Section 2: Application layer

Application Layer. Pure P2P architecture. Client-server architecture. Processes communicating. Hybrid of client-server and P2P. Creating a network app

CS 43: Computer Networks BitTorrent & Content Distribution. Kevin Webb Swarthmore College September 28, 2017

CSE 486/586 Distributed Systems Peer-to-Peer Architectures

P2P Applications. Reti di Elaboratori Corso di Laurea in Informatica Università degli Studi di Roma La Sapienza Canale A-L Prof.ssa Chiara Petrioli

Chapter 2 Application Layer

Lecture 21 P2P. Napster. Centralized Index. Napster. Gnutella. Peer-to-Peer Model March 16, Overview:

Network Application. Topic. Principle of Network Application. Principle of Network Application

Applications & Application-Layer Protocols: The Domain Name System and Peerto-Peer

Telematics Chapter 9: Peer-to-Peer Networks

CMSC 322 Computer Networks Applications and End-To- End

Application Layer. Pure P2P architecture. Client-server architecture. Processes communicating. Hybrid of client-server and P2P. Creating a network app

Chapter 2. Application Layer. 2: Application Layer 1

P2P Applications. Reti di Elaboratori Corso di Laurea in Informatica Università degli Studi di Roma La Sapienza

Application layer. Some network apps. Client-server architecture. Hybrid of client-server and P2P. Pure P2P architecture. Creating a network app

Peer to Peer Computing

CS 640 Introduction to Computer Networks. Today s lecture. What is P2P? Lecture30. Peer to peer applications

Goal and A sample Network App

Lecture 05: Application Layer (Part 02) FTP, Peer-to-Peer, . Dr. Anis Koubaa

Introduction to P P Networks

Telecommunication Services Engineering Lab. Roch H. Glitho

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 6

Information Network Systems The application layer. Stephan Sigg

Chapter 2 Application Layer

Content distribution networks

Web caches (proxy server) Applications (part 3) Applications (part 3) Caching example (1) More about Web caching

CompSci 356: Computer Network Architectures Lecture 21: Overlay Networks Chap 9.4. Xiaowei Yang

BitTorrent. Masood Khosroshahy. July Tech. Report. Copyright 2009 Masood Khosroshahy, All rights reserved.

Chapter 2 Application Layer

Chapter 10: Application Layer CCENT Routing and Switching Introduction to Networks v6.0

Introduction to the Application Layer. Computer Networks Term B14

Peer-to-Peer (P2P) Systems

Introduction to Peer-to-Peer Networks

Department of Computer Science Institute for System Architecture, Chair for Computer Networks. File Sharing

Peer-to-Peer Internet Applications: A Review

Application Layer Introduction; HTTP; FTP

CSC 401 Data and Computer Communications Networks

Chapter 2 Application Layer

Scalability of the BitTorrent P2P Application

Advanced Computer Networks

Peer to Peer Networks

CS118 Discussion Week 2. Taqi

Overview Computer Networking Lecture 17: Delivering Content Peer to Peer Examples Peter Steenkiste

CS 43: Computer Networks. 14: DHTs and CDNs October 3, 2018

Chapter 1 Introduction

Content Distribution and BitTorrent [Based on slides by Cosmin Arad]

DISTRIBUTED COMPUTER SYSTEMS ARCHITECTURES

Scalable overlay Networks

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 4

Overlay and P2P Networks. Unstructured networks. PhD. Samu Varjonen

CPS 706 Computer Networks (Fall 2011)

Application Layer Protocols

Overlay and P2P Networks. Unstructured networks. Prof. Sasu Tarkoma

P2PSIP, ICE, and RTCWeb

Client/Server Computing & Socket Programming

P2P. 1 Introduction. 2 Napster. Alex S. 2.1 Client/Server. 2.2 Problems

CSC 4900 Computer Networks: End-to-End Design

Page 1. How Did it Start?" Model" Main Challenge" CS162 Operating Systems and Systems Programming Lecture 24. Peer-to-Peer Networks"

Overlay and P2P Networks. Unstructured networks. Prof. Sasu Tarkoma

Using peer to peer. Marco Danelutto Dept. Computer Science University of Pisa

CCNA Exploration Network Fundamentals. Chapter 03 Application Functionality and Protocols

Peer-to-Peer Architectures and Signaling. Agenda

Introduction to P2P systems

Chapter 2 Application Layer

Applications. Chong-kwon Kim. Running in end systems (hosts) over transport layer protocols Ex: , Web, FTP, instant messaging

Game Theory. Presented by Hakim Weatherspoon

Middleware and Distributed Systems. Peer-to-Peer Systems. Peter Tröger

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Multimedia Networking

08 Application protocols

Creating a network app

6. Peer-to-peer (P2P) networks I.

Peer-to-Peer Signalling. Agenda

CSC358 Week 3. Adapted from slides by J.F. Kurose and K. W. Ross. All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

Hybrid of client-server and P2P. Pure P2P Architecture. App-layer Protocols. Communicating Processes. Transport Service Requirements

Distributed Systems. peer-to-peer Johan Montelius ID2201. Distributed Systems ID2201

CS 332: Computer Networks Introduction

Chapter 9. Multimedia Networking. Computer Networking: A Top Down Approach

12/5/16. Peer to Peer Systems. Peer-to-peer - definitions. Client-Server vs. Peer-to-peer. P2P use case file sharing. Topics

Outline. P2P and Content Distribution. P2P Definitions. More Definitions. P2P is not new. P2P Definitions. P2P Overview P2P systems P2P and DRM

Chapter 2. Application Layer. Chapter 2: Application Layer. Application layer - Overview. Some network apps. Creating a network appication

First Semester Examinations 2015/16 (Model Solution) INTERNET PRINCIPLES

Lecture 17: Peer-to-Peer System and BitTorrent

Chapter 2: application layer

Octoshape. Commercial hosting not cable to home, founded 2003

Transcription:

CMSC 332 Computer Networks P2P and Sockets Professor Szajda

Announcements Programming Assignment 1 is due Thursday Where are we? What sorts of problems are we having? 2

Recap SMTP is the language that mail servers use to exchange messages. SMTP is push-based... why? You can run SMTP from a telnet window. Anything interesting here? DNS translates between names and IP addresses. Returns NS, MX, CNAME and A records. Never designed to be secure - and we re beginning to pay for that. 3

Chapter 2: Application Layer 2.1 Principles of network applications 2.2 Web and HTTP 2.3 FTP 2.4 Electronic Mail 2.5 DNS 2.6 P2P Applications 4

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 5

File Distribution: Server-Client vs P2P Question: How much time to distribute file from one server to N peers? File, size F Server u 1 d 1 u 2 u d 2 s u s : server upload bandwidth u i : peer i upload bandwidth d i : peer i download bandwidth d N u N Network (with abundant bandwidth) 6

File Distribution Time: Server-Client Server sequentially sends N copies: NF/us time Client i takes F/d min time to download F d N u N u u 2 1 d 1 u d s 2 Network (with abundant bandwidth) Time to distribute F to N clients using client/server approach = dcs = max { NF/us, F/dmin } increases linearly in N (for large N) 7

File Distribution Time: P2P Server must send one copy: F/us time Client i takes F/d min time to download NF bits must be downloaded (aggregate) fastest possible upload rate: us + Σui F Server d N u N u u 2 1 d 1 u d s 2 Network (with abundant bandwidth) dp2p = max { F/us, F/dmin, NF/(us + Σui) } 8

Server-Client vs P2P: Example Client upload rate = u, F/u = 1 hour, us = 10u, dmin us 9

File Distribution: Bit Torrent 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 10

BitTorrent (continued) 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 11

BitTorrent (even more) 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 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 12

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! 13

P2P: Searching for Information Index in P2P system: maps information to peer location (location = IP address & port number) File sharing (e.g., e-mule) Index dynamically tracks the locations of files that peers share. Peers need to tell index what they have. Peers search index to determine where files can be found Instant Messaging Index maps user names to locations. When user starts IM application, it needs to inform index of its location Peers search index to determine IP address of user. 14

P2P: Centralized Index original Napster design 1. When peer connects, it informs central server: IP address content 2. Alice queries for Hey Jude centralized directory server 2 1 1 1 1 3 Bob peers 3. Alice requests file from Bob Alice 15

P2P: Problems with Centralized Directory Single point of failure Performance bottleneck Copyright infringement: target of lawsuit is obvious file transfer is decentralized, but locating content is highly centralized 16

Query Flooding Fully distributed No central server Used by Gnutella Each peer indexes the files it makes available for sharing (and no other files) Edge between peer X and Y if there s a TCP connection. All active peers and edges form overlay net. Edge: virtual (not physical) link given peer typically connected with <10 overlay neighbors 17

Query Flooding Query message sent over existing TCP connections peers forward Query message QueryHit sent over reverse path Scalability: limited scope flooding Query QueryHit Query QueryHit Query File transfer: HTTP Query QueryHit Query 18

Gnutella: Peer Joining 1. joining peer Alice must find another peer in Gnutella network: use list of candidate peers 2. Alice sequentially attempts TCP connections with candidate peers until connection setup with Bob 3. Flooding: Alice sends Ping message to Bob; Bob forwards Ping message to his overlay neighbors (who then forward to their neighbors.) peers receiving Ping message respond to Alice with Pong message 4. Alice receives many Pong messages, and can then setup additional TCP connections 19

Hierarchical Overlay Between centralized index, query flooding approaches Each peer is either a super node or assigned to a super node TCP connection between peer and its super node. TCP connections between some pairs of super nodes. Super node tracks content in its children 20

P2P Case Study: Skype 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 Skype clients (SC) Supernode (SN) 21

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 22

Chapter 2: Summary Most importantly: We learned about protocols Communications architectures Client/Server P2P Hybrid Complexity at the network edge Message Formats: headers vs. data Stateless vs Stateful Reliable vs Unreliable transfer 23

Next Time Transport Layer Let s finally talk about the details behind TCP and UDP 24