CHAPTER 2. Creating a network app write programs that – run on (different) end systems – communicate over network – e.g., web server software communicates.

Slides:



Advertisements
Similar presentations
Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Application Layer – Lecture.
Advertisements

Application Layer-11 CSE401N: Computer Networks Lecture-4 Application Layer Overview HTTP.
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
2: Application Layer1 Chapter 2: Application Layer Our goals: r conceptual, implementation aspects of network application protocols m transport-layer service.
Chapter 2: Application Layer
1 Application Layer. 2 Writing Networked Applications TCP UDP IP LL PL TCP UDP IP LL PL TCP UDP IP LL PL Web Browser Web Server Ftp Server Ftp Client.
1 Creating a network app Write programs that m run on different end systems and m communicate over a network. m e.g., Web: Web server software communicates.
Application Layer Overview and Web/HTTP
Chapter 2: Application layer  2.1 Web and HTTP  2.2 FTP 2-1 Lecture 5 Application Layer.
Introduction to the Application Layer Computer Networks Computer Networks Spring 2012 Spring 2012.
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
1 An Overview of Applications Xin Liu ECS 152A Ref: slides by J. Kurose and K. Ross.
Chapter 2 Application Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 4.
1 Computer Networks Transport Layer Protocols. 2 Application-layer Protocols Application-layer protocols –one “piece” of an app –define messages exchanged.
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
Some slides are in courtesy of J. Kurose and K. Ross Review of Previous Lecture Network access and physical media Internet structure and ISPs Delay & loss.
Dr. Philip Cannata 1 Principles of Network Applications.
Introduction 1 Lecture 5 Application Layer slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering Department.
2: Application Layer World Wide Web (WWW). Introduction 1-2 Internet protocol stack (recap) r application: supporting network applications m FTP,
Chapter 2, slide: 1 ECE/CS 372 – introduction to computer networks Lecture 5 Announcements: r Lab1 is due today r Lab2 is posted and is due next Tuesday.
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.
Chapter 2, slide: 1 CS 372 – introduction to computer networks* Monday June 28 Announcements: r Lab 1 is due today r Lab 2 is posted today and is due next.
2: Application Layer1 Chapter 2 Application Layer These slides derived from Computer Networking: A Top Down Approach, 6 th edition. Jim Kurose, Keith Ross.
Trying out HTTP (client side) for yourself
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
1 Computer Communication & Networks Lecture 27 Application Layer: Electronic mail and FTP Waleed.
Throughput: Internet scenario
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.
2: Application Layer1 Some network apps r r Web r Instant messaging r Remote login r P2P file sharing r Multi-user network games r Streaming stored.
19-1 Last time □ TCP ♦ Throughput ♦ Fairness ♦ Delay modeling □ TCP socket programming.
1 Application Layer Lecture 4 Imran Ahmed University of Management & Technology.
CS 3830 Day 7 Introduction : Application Layer 2 Processes communicating Process: program running within a host. r within same host, two processes.
1 CS 455/555 Intro to Networks and Communications Client/Server Computing and Socket Programming (2.1, ) Michele Weigle Department of Computer Science.
20-1 Last time □ NAT □ Application layer ♦ Intro ♦ Web / HTTP.
What makes a network good? Ch 2.1: Principles of Network Apps 2: Application Layer1.
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.
2: Application Layer 1 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 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
Sockets process sends/receives messages to/from its socket
Lecture 4 Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 CS3516: These slides are generated from.
CS1652 September 5 th, 2013 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights.
Application Layer of TCP/IP. Application Layer Application Layer Architecture transport-layer service models client-server paradigm peer-to-peer paradigm.
1 End-user Protocols, Services and QoS. 2 Layering: logical communication application transport network link physical application transport network link.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 8 Omar Meqdadi Department of Computer Science and Software Engineering University of.
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.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
CS 3830 Day 9 Introduction 1-1. Announcements r Quiz #2 this Friday r Demo prog1 and prog2 together starting this Wednesday 2: Application Layer 2.
Lecture 23 Application Layer ELEN E6761: Communication Networks Instructor: Javad Ghaderi Slides adapted from “Computer Networking: A Top Down Approach”
2: Application Layer 1 Chapter 2 Application Layer Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April.
2: Application Layer 1 Application layer  Principles of network applications  Web and HTTP  FTP, TFTP  TELNET  Electronic Mail  SMTP, POP3, IMAP.
2: Application Layer 1 Chapter 2 Application Layer Computer Networking: A Top Down Approach, 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April.
Important r There will be NO CLASS on Friday 1/30/2015! r Please mark you calendars 1.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach, 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
1 Chapter 2: Application Layer Part A Introduction r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP.
2: Application Layer 1 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,
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.
Ch 2. Application Layer Myungchul Kim
@Yuan Xue CS 283Computer Networks Spring 2011 Instructor: Yuan Xue.
CSEN 404 Application Layer II Amr El Mougy Lamia Al Badrawy.
Chapter 7 Application Layer 1 Some of the slides in this chapter are courtesy of Profs. Kurose/Ross and others.
A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their original slides that accompany the.
CSEN 404 Application Layer I Amr El Mougy Lamia Al Badrawy.
Lecture 5 Internet Core: Protocol layers. Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP 
Introduction to Networks
Chapter 2: Application Layer
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 9
Chapter 2 Application Layer
Introduction to Networks
Chapter 2 Introduction Application Requirements VS. Transport Services
Presentation transcript:

CHAPTER 2

Creating a network app write programs that – run on (different) end systems – communicate over network – e.g., web server software communicates with browser software No need to write software for network-core devices – network-core devices do not run user applications – applications on end systems allows for rapid app development, propagation application transport network data link physical application transport network data link physical application transport network data link physical Application 2-2

Application architectures client-server peer-to-peer (P2P) hybrid of client-server and P2P Application 2-3

Client-server architecture server: – always-on host – permanent IP address – server farms for scaling clients: – communicate with server – may be intermittently connected – may have dynamic IP addresses – do not communicate directly with each other client/server Application 2-4

Pure P2P architecture no always-on server arbitrary end systems directly communicate peers are intermittently connected and change IP addresses highly scalable but difficult to manage peer-peer Application 2-5

Hybrid of client-server and P2P Skype – voice-over-IP P2P application – centralized server: finding address of remote party: – client-client connection: direct (not through server) Instant messaging – chatting between two users is P2P – centralized service: client presence detection/location user registers its IP address with central server when it comes online user contacts central server to find IP addresses of buddies Application 2-6

Processes communicating process: program running within a host. within same host, two processes communicate using inter-process communication (defined by OS). processes in different hosts communicate by exchanging messages client process: process that initiates communication server process: process that waits to be contacted  aside: applications with P2P architectures have client processes & server processes Application 2-7

Addressing processes to receive messages, process must have identifier host device has unique 32-bit IP address Q: does IP address of host on which process runs suffice for identifying the process? Application 2-8

Addressing processes to receive messages, process must have identifier host device has unique 32- bit IP address Q: does IP address of host on which process runs suffice for identifying the process? – A: No, many processes can be running on same host identifier includes both IP address and port numbers associated with process on host. example port numbers: – HTTP server: 80 – Mail server: 25 to send HTTP message to gaia.cs.umass.edu web server: – IP address: – Port number: 80 more shortly… Application 2-9

App-layer protocol defines types of messages exchanged, – e.g., request, response message syntax: – what fields in messages & how fields are delineated message semantics – meaning of information in fields rules for when and how processes send & respond to messages public-domain protocols: defined in RFCs allows for interoperability e.g., HTTP, SMTP proprietary protocols: e.g., Skype Application 2-10

What transport service does an app need? Data loss some apps (e.g., audio) can tolerate some loss other apps (e.g., file transfer, telnet) require 100% reliable data transfer Timing some apps (e.g., Internet telephony, interactive games) require low delay to be “effective” Throughput  some apps (e.g., multimedia) require minimum amount of throughput to be “effective”  other apps (“elastic apps”) make use of whatever throughput they get Security  encryption, data integrity, … Application 2-11

Transport service requirements of common apps Application file transfer Web documents real-time audio/video stored audio/video interactive games instant messaging Data loss no loss loss-tolerant no loss Throughput elastic audio: 5kbps-1Mbps video:10kbps-5Mbps same as above few kbps up elastic Time Sensitive no yes, 100’s msec yes, few secs yes, 100’s msec yes and no Application 2-12

Internet transport protocols services TCP service: connection-oriented: setup required between client and server processes reliable transport between sending and receiving process flow control: sender won’t overwhelm receiver congestion control: throttle sender when network overloaded does not provide: timing, minimum throughput guarantees, security UDP service: unreliable data transfer between sending and receiving process does not provide: connection setup, reliability, flow control, congestion control, timing, throughput guarantee, or security Q: why bother? Why is there a UDP? Application 2-13

Cookies (continued) what cookies can bring: authorization shopping carts recommendations user session state (Web e- mail) cookies and privacy:  cookies permit sites to learn a lot about you  you may supply name and to sites aside how to keep “state”:  protocol endpoints: maintain state at sender/receiver over multiple transactions  cookies: http messages carry state Application 2-14

Web caches (proxy server) user sets browser: Web accesses via cache browser sends all HTTP requests to cache – object in cache: cache returns object – else cache requests object from origin server, then returns object to client Goal: satisfy client request without involving origin server client Proxy server client HTTP request HTTP response HTTP request origin server origin server HTTP response Application 2-15

More about Web caching cache acts as both client and server typically cache is installed by ISP (university, company, residential ISP) why Web caching? reduce response time for client request reduce traffic on an institution’s access link. Internet dense with caches: enables “poor” content providers to effectively deliver content (but so does P2P file sharing) Application 2-16

Caching example assumptions average object size = 100,000 bits avg. request rate from institution’s browsers to origin servers = 15/sec delay from institutional router to any origin server and back to router = 2 sec consequences utilization on LAN = 15% utilization on access link = 100% total delay = Internet delay + access delay + LAN delay = 2 sec + minutes + milliseconds origin servers public Internet institutional network 10 Mbps LAN 1.5 Mbps access link institutional cache Application 2-17

Caching example (cont) possible solution increase bandwidth of access link to, say, 10 Mbps consequence utilization on LAN = 15% utilization on access link = 15% Total delay = Internet delay + access delay + LAN delay = 2 sec + msecs + msecs often a costly upgrade origin servers public Internet institutional network 10 Mbps LAN 10 Mbps access link institutional cache Application 2-18

Caching example (cont) possible solution: install cache consequence suppose hit rate is 0.4 – 40% requests will be satisfied almost immediately – 60% requests satisfied by origin server utilization of access link reduced to 60%, resulting in negligible delays (say 10 msec) total avg delay = Internet delay + access delay + LAN delay =.6*(2.01) secs +.4*milliseconds < 1.4 secs origin servers public Internet institutional network 10 Mbps LAN 1.5 Mbps access link institutional cache Application 2-19

FTP: the file transfer protocol transfer file to/from remote host client/server model – client: side that initiates transfer (either to/from remote) – server: remote host ftp: RFC 959 ftp server: port 21 file transfer FTP server FTP user interface FTP client local file system remote file system user at host Application 2-20

FTP: separate control, data connections FTP client contacts FTP server at port 21, TCP is transport protocol client authorized over control connection client browses remote directory by sending commands over control connection. when server receives file transfer command, server opens 2 nd TCP connection (for file) to client after transferring one file, server closes data connection. FTP client FTP server TCP control connection, server port 21 TCP data connection, server port 20  server opens another TCP data connection to transfer another file.  control connection: “out of band”  FTP server maintains “state”: current directory, earlier authentication Application 2-21

Electronic Mail Three major components: user agents mail servers simple mail transfer protocol: SMTP User Agent a.k.a. “mail reader” composing, editing, reading mail messages e.g., Outlook, elm, Mozilla Thunderbird, iPhone mail client outgoing, incoming messages stored on server user mailbox outgoing message queue mail server user agent user agent user agent mail server user agent user agent mail server user agent SMTP Application 2-22

Electronic Mail: mail servers Mail Servers mailbox contains incoming messages for user message queue of outgoing (to be sent) mail messages SMTP protocol between mail servers to send messages – client: sending mail server – “server”: receiving mail server mail server user agent user agent user agent mail server user agent user agent mail server user agent SMTP Application 2-23

DNS: Domain Name System people: many identifiers: – SSN, name, passport # Internet hosts, routers: – IP address (32 bit) - used for addressing datagrams – “name”, e.g., - used by humans Q: map between IP address and name, and vice versa ? Domain Name System: distributed database implemented in hierarchy of many name servers application-layer protocol host, routers, name servers to communicate to resolve names (address/name translation) – note: core Internet function, implemented as application- layer protocol – complexity at network’s “edge” Application 2-24

DNS Why not centralize DNS? single point of failure traffic volume distant centralized database maintenance doesn’t scale! DNS services hostname to IP address translation host aliasing – Canonical, alias names mail server aliasing load distribution – replicated Web servers: set of IP addresses for one canonical name Application 2-25

Formulas Dcs = max { NR/Us, F/dmin } N = Number of clients Us= Upload capacity of server F = file size Dmin = minimum distribution time. Dp2p = max { F / Us, F / dmin, NF / us + i=1 to n  ui}

Problem 1 P1: Consider distributing a file of F=10 Gbits to N peers. The server has an upload rate of Us = 20 Mbps and each peer has a download rate of di = 1 Mbps and upload rate of u. for N = 10, 100 and 1000 and u = 200 Kbps, 600 kbps and 1 Mbs, prepare a chart giving the minimum distribution time for each of the combination of N and u for both client server distribution and P2P distribution.