1 Application Layer Lecture 4 Imran Ahmed University of Management & Technology.

Slides:



Advertisements
Similar presentations
HyperText Transfer Protocol (HTTP)
Advertisements

Application Layer 2-1 Chapter 2 Application Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Application Layer – Lecture.
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 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.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
Application Layer Overview and Web/HTTP
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.
Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley, July.
Week 11: Application Layer1 Week 11: 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,
Web, HTTP and Web Caching
Introduction to the Application Layer Computer Networks Computer Networks Spring 2012 Spring 2012.
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 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.
2/9/2004 Web and HTTP February 9, /9/2004 Assignments Due – Reading and Warmup Work on Message of the Day.
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
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 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.
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.
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.
2: Application Layer1 CS 4244: Internet Software Development Dr. Eli Tilevich.
Week 11: Application Layer1 Web and HTTP First some jargon r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,…
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose, Keith Ross.
2: Application Layer1 Web and HTTP First some jargon Web page consists of base HTML-file which includes several referenced objects Object can be HTML file,
1 Computer Communication & Networks Lecture 28 Application Layer: HTTP & WWW p Waleed Ejaz
What makes a network good? Ch 2.1: Principles of Network Apps 2: Application Layer1.
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,
Sockets process sends/receives messages to/from its socket
Application Layer of TCP/IP. Application Layer Application Layer Architecture transport-layer service models client-server paradigm peer-to-peer paradigm.
1 HTTP EECS 325/425, Fall 2005 September Chapter 2: Application layer r 2.1 Principles of network applications m app architectures m app requirements.
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.
Lecture 23 Application Layer ELEN E6761: Communication Networks Instructor: Javad Ghaderi Slides adapted from “Computer Networking: A Top Down Approach”
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.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 2 nd edition. Jim Kurose, Keith Ross.
Important r There will be NO CLASS on Friday 1/30/2015! r Please mark you calendars 1.
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.
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,
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 7 Omar Meqdadi Department of Computer Science and Software Engineering University of.
Week 11: Application Layer 1 Web and HTTP r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,… r Web page consists.
@Yuan Xue CS 283Computer Networks Spring 2011 Instructor: Yuan Xue.
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.
Introduction to Networks
Application Layer Dr. Adil Yousif Lecture 2 CS.
Chapter 2: Application Layer
Application layer 1 Principles of network applications 2 Web and HTTP
Internet transport protocols services
Chapter 2 Application Layer
Introduction to Networks
Chapter 2 Introduction Application Requirements VS. Transport Services
Computer Communication & Networks
Presentation transcript:

1 Application Layer Lecture 4 Imran Ahmed University of Management & Technology

2 Application Layer Our goals: Conceptual, implementation aspects of network application protocols. –Transport-layer service models –Client-server paradigm –Peer-to-peer paradigm Learn about protocols by examining popular application-level protocols; –HTTP –FTP –SMTP/POP3/IMAP –DNS Programming network applications; –Socket API

3 Some network apps. Web Instant messaging Remote login P2P file sharing Multi-user network games Streaming stored video clips Internet telephone Real-time video conference Massive parallel computing

4 Creating a network app Write programs that –run on different end systems and –communicate over a network. –e.g., Web: Web server software communicates with browser software No software written for devices in network core –Network core devices do not function at app layer –This design allows for rapid app development application transport network data link physical application transport network data link physical application transport network data link physical

5 Agenda Principles of network applications Web and HTTP FTP Electronic Mail –SMTP, POP3, IMAP DNS P2P file sharing Socket programming with TCP Socket programming with UDP

6 Application architectures Client-server Peer-to-peer (P2P) Hybrid of client-server and P2P

7 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

8 Pure P2P architecture no always on, server arbitrary end systems directly communicate peers are intermittently connected and change IP addresses example: Gnutella Highly scalable But difficult to manage

9 Hybrid of client-server and P2P Napster –File transfer P2P –File search centralized: Peers register content at central server Peers query same central server to locate content Instant messaging –Chatting between two users is P2P –Presence detection/location centralized: User registers its IP address with central server when it comes online User contacts central server to find IP addresses of buddies

10 Process 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. Note: application with P2P architectures have client processes and server processes.

11 Sockets Process sends/receives messages to/from its socket. Socket analogous to door –sending process shoves message out door –sending process relies on transport infrastructure on other side of door which brings message to socket at receiving process process TCP with buffers, variables socket host or server process TCP with buffers, variables socket host or server Internet controlled by OS controlled by app developer API: (1) choice of transport protocol; (2) ability to fix a few parameters (lots more on this later)

12 Addressing processes For a process to receive messages, it must have an identifier. A host has a unique 32-bit IP address. Q: does the IP address of the host on which the process runs suffice for identifying the process? Answer: No, many processes can be running on same host. Identifier includes both the IP address and port numbers associated with the process on the host. Example port numbers: –HTTP server: 80 –Mail server: 25

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

14 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 bandwidth guarantees UDP service: unreliable data transfer between sending and receiving process does not provide: connection setup, reliability, flow control, congestion control, timing, or bandwidth guarantee Q: why bother? Why is there a UDP?

15 Agenda Principles of network applications Web and HTTP FTP Electronic Mail –SMTP, POP3, IMAP DNS P2P file sharing Socket programming with TCP Socket programming with UDP

16 Web and HTTP First some jargon: Web page consists of objects. Object can be HTML file, JPEG image, Java applet, audio file etc. Web page consists of base HTML file which includes several referenced objects. Each object is addressable by a URL. Example URL:

17 HTTP overview HTTP: hypertext transfer protocol Web’s application layer protocol client/server model –client: browser that requests, receives, “displays” Web objects –server: Web server sends objects in response to requests HTTP 1.0: RFC 1945 HTTP 1.1: RFC 2616 PC running Explorer Server running Apache Web server Mac running Navigator HTTP request HTTP response

18 HTTP overview (continued) Uses TCP: client initiates TCP connection (creates socket) to server, port 80 server accepts TCP connection from client HTTP messages (application-layer protocol messages) exchanged between browser (HTTP client) and Web server (HTTP server) TCP connection closed HTTP is “stateless” server maintains no information about past client requests Protocols that maintain “state” are complex! past history (state) must be maintained if server/client crashes, their views of “state” may be inconsistent, must be reconciled aside

19 HTTP connections Nonpersistent HTTP At most one object is sent over a TCP connection. HTTP/1.0 uses nonpersistent HTTP Persistent HTTP Multiple objects can be sent over single TCP connection between client and server. HTTP/1.1 uses persistent connections in default mode

20 Nonpersistent connections suppose user enters URL: –(Contains a base HTML file and ten JPEG images and all these objects reside on the same server)

21

22 Response time modeling Response Time Modeling – time to send a small packet to travel from client to server and back. Response Time: –One RTT to initiate TCP connection –One RTT for HTTP request and first few bytes of HTTP response to return –File transmission time total = 2RTT+transmit time

23 Some issues Nonpersistent HTTP issues: –Requires 2 RTTs per object –OS must work and allocate host resources for each TCP connection –But browsers often open parallel TCP connections to fetch referenced objects. Persistent HTTP: –Server leaves connection open after sending response –Subsequent HTTP messages between same client/server are sent over connection

24 Some issues (contd.) Persistent without pipelining: –Client issues new request only when previous response has been received. –One RTT for each referenced object. Persistent with pipelining: –Default in HTTP/1.1 –Client sends requests as soon as it encounters a referenced object. –As little as one RTT for all the referenced objects.

25 HTTP Messages Method types: HTTP/1.0 –GET –POST –HEAD Ask server to leave requested object out of response HTTP/1.1 –GET, POST, HEAD –PUT Uploads file in entity body to path specified in URL field –DELETE Deletes file specified in the URL field

26 HTTP Request Message HTTP request message: –ASCII (human-readable format)

27 HTTP Response Message

28 HTTP Response Status Codes In first line in server – client response message. A few sample codes:- 200OK –request succeeded, requested object later in this message 301Moved Permanently –requested object moved, new location specified later in this message (Location:) 400Bad Request –request message not understood by server 404Not Found –requested document not found on this server 505HTTP Version Not Supported

29 Cookies Many major web sites use cookies. Four components: 1.Cookie header line in the HTTP response message. 2.Cookie header line in the HTTP request message. 3.Cookie file kept on user’s host and managed by user’s browser. 4.Back-end database at web site.

30 Cookies: keeping “State”

31 Summary We have studied about some basic principles of network application. About HTTP protocol in detail. Cookies concept as well.