Chapter 2: Application layer

Similar documents
CMSC 332 Computer Networks P2P and Sockets

Application Layer: P2P File Distribution

CC451 Computer Networks

CSC 4900 Computer Networks: P2P and Sockets

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

CS 3516: Advanced Computer Networks

Lecture 8: Application Layer P2P Applications and DHTs

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

Peer-to-Peer Applications Reading: 9.4

CS 3516: Computer Networks

Computer Networking Introduction

Section 2: Application layer

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

Peer-to-Peer Networks

Unit 8 Peer-to-Peer Networking

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

Chapter 2 Application Layer

internet technologies and standards

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

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

Chapter 2. Application Layer. 2: Application Layer 1

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

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

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

Peer to Peer Computing

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

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

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

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

Goal and A sample Network App

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

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

Introduction to the Application Layer. Computer Networks Term B14

Chapter 2 Application Layer

Chapter 2 Application Layer

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

Peer-to-Peer (P2P) Systems

Telecommunication Services Engineering Lab. Roch H. Glitho

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

CMSC 322 Computer Networks Applications and End-To- End

Content distribution networks

Chapter 1 Introduction

Telematics Chapter 9: Peer-to-Peer Networks

CS118 Discussion Week 2. Taqi

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

Different Layers Lecture 21

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

Chapter 2 Application Layer

Introduction to P P Networks

Introduction to Peer-to-Peer Networks

Chapter 2: outline. 2.6 P2P applications 2.7 socket programming with UDP and TCP

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

Creating a network app

Advanced Computer Networks

Information Network Systems The application layer. Stephan Sigg

Peer to Peer Networks

Lecture 05: Application Layer (Part 02) Domain Name System. Dr. Anis Koubaa

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

Application Layer Introduction; HTTP; FTP

CSC 401 Data and Computer Communications Networks

Today. Architectural Styles

CSC 4900 Computer Networks: End-to-End Design

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

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

Peer-to-Peer Internet Applications: A Review

Chapter 2 Application Layer

Client/Server Computing & Socket Programming

Lecture 2 - Application Layer. Lecture 1 Review. Application Layer. Principles of network applications. Notes. Notes. Notes. Notes

CSC 401 Data and Computer Communications Networks

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

Architectures for distributed systems (Chapter 2)

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

Chapter 2 Application Layer

Chapter 2: application layer

Chapter 2 Application Layer

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

Scalability of the BitTorrent P2P Application

Chapter 2 Application Layer

Multimedia Networking

DISTRIBUTED COMPUTER SYSTEMS ARCHITECTURES

Scalable overlay Networks

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

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

The Application Layer: SMTP, FTP

Today. Architectural Styles

Client/Server Computing & Socket Programming

Web caches (proxy server)

Protocol Layers, Security Sec: Application Layer: Sec 2.1 Prof Lina Battestilli Fall 2017

Chapter P2P file sharing network applications 2.22 Web and HTTP 2.3 FTP DNS

Chapter 2 Application Layer

08 Application protocols

Networking: Application layer

Foundations of Telematics

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

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

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

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

Announcements. CS 5565 Network Architecture and Protocols. Outline for today. The Internet: nuts and bolts view. The Internet: nuts and bolts view

Transcription:

Chapter 2: Application layer 2. Principles of network applications app architectures app requirements 2.2 Web and HTTP 2.4 Electronic Mail SMTP, POP3, IMAP 2.5 DNS 2.6 P2P applications 2.7 Socket programming with TCP 2.8 Socket programming with UDP 2: Application Layer Pure P2P architecture no always-on server arbitrary end systems directly communicate peer-peer peers are intermittently connected and change IP addresses Three topics: File distribution Searching for information Case Study: Skype 2: Application Layer 2

File Distribution: Server-Client vs P2P Question : How much time to distribute file from one server to N peers? File, size F Server u d u s u 2 d2 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) 2: Application Layer 3 File distribution time: server-client server sequentially sends N copies: NF/u s time client i takes F/d i time to download F Server d N u N u d u 2 u s d2 Network (with abundant bandwidth) Time to distribute F to N clients using client/server approach = d cs = max { NF/u s, F/min(d i ) } i increases linearly in N (for large N) 2: Application Layer 4 2

File distribution time: P2P server must send one copy: F/u s time client i takes F/d i time to download NF bits must be downloaded (aggregate) F Server d N u N u d u 2 u s d2 Network (with abundant bandwidth) fastest possible upload rate: u s + Σu i d P2P = max { F/u s, F/min(d i ), NF/(u s + Σu i ) } i 2: Application Layer 5 Server-client vs. P2P: example Client upload rate = u, F/u = hour, u s = 0u, d min u s Minimum Distribution Time 3.5 3 2.5 2.5 0.5 0 P2P Client-Server 0 5 0 5 20 25 30 35 N 2: Application Layer 6 3

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 2: Application Layer 7 BitTorrent () 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 2: Application Layer 8 4

BitTorrent (2) 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 Sending Chunks: tit-for-tat Alice sends chunks to four neighbors currently sending her chunks at the highest rate re-evaluate top 4 every 0 secs every 30 secs: randomly select another peer, starts sending chunks newly chosen peer may join top 4 optimistically unchoke 2: Application Layer 9 BitTorrent: Tit-for-tat () 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! 2: Application Layer 0 5

P2P: searching for information Index in P2P system: maps information to peer location (location = IP address & port number). File sharing (eg 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. 2: Application Layer P2P: centralized index original Napster design ) when peer connects, it informs central server: IP address content 2) Alice queries for Hey Jude 3) Alice requests file from Bob centralized directory server 2 3 Bob peers Alice 2: Application Layer 2 6

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 2: Application Layer 3 Query flooding fully distributed no central server used by Gnutella Each peer indexes the files it makes available for sharing (and no other files) overlay network: graph 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 < 0 overlay neighbors 2: Application Layer 4 7

Query flooding Query message sent over existing TCP connections peers forward Query message QueryHit sent over reverse path Query QueryHit Query QueryHit File transfer: HTTP Query QueryHit Query Scalability: limited scope flooding Query 2: Application Layer 5 Gnutella: Peer joining. 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 Peer leaving: see homework problem! 2: Application Layer 6 8

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 ordinary peer group-leader peer neighoring relationships in overlay network 2: Application Layer 7 P2P Case study: Skype inherently P2P: pairs of users communicate. proprietary Skype application-layer login server protocol (inferred via reverse engineering) hierarchical overlay with SNs Index maps usernames to IP addresses; distributed over SNs Skype clients (SC) Supernode (SN) 2: Application Layer 8 9

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 2: Application Layer 9 Chapter 2: Summary our study of network apps now complete! application architectures client-server P2P hybrid application service requirements: reliability, bandwidth, delay Internet transport service model connection-oriented, reliable: TCP unreliable, datagrams: UDP specific protocols: HTTP FTP SMTP, POP, IMAP DNS P2P: BitTorrent, Skype socket programming 2: Application Layer 20 0

Chapter 2: Summary Most importantly: learned about protocols typical request/reply message exchange: client requests info or service server responds with data, status code message formats: headers: fields giving info about data data: info being communicated Important themes: control vs. data msgs in-band, out-of-band centralized vs. decentralized stateless vs. stateful reliable vs. unreliable msg transfer complexity at network edge 2: Application Layer 2