9/16/2003-9/18/2003 The Application Layer and Java Programming September 16-18, 2003.

Slides:



Advertisements
Similar presentations
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Advertisements

EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
HyperText Transfer Protocol (HTTP)
Chapter 2 Application Layer
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
HyperText Transfer Protocol (HTTP) Computer Networks Computer Networks Spring 2012 Spring 2012.
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  2.1 Web and HTTP  2.2 FTP 2-1 Lecture 5 Application Layer.
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
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
2: Application Layer1 Chapter 2: Application Layer Our goals: r conceptual, implementation aspects of network application protocols m transport-layer service.
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
1 K. Salah Module 2.1: Application Layer Application-level protocols provide high-level services –Web and HTTP –DNS –Electronic mail –Remote login –FTP.
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.
Introduction 1 Lecture 7 Application Layer (FTP, ) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
2: Application Layer World Wide Web (WWW). Introduction 1-2 Internet protocol stack (recap) r application: supporting network applications m FTP,
1 Application Layer Lecture 5 Imran Ahmed University of Management & Technology.
1 Computer Communication & Networks Lecture 27 Application Layer: Electronic mail and FTP Waleed.
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.
FTP (File Transfer Protocol) & Telnet
Mail (smtp), VoIP (sip, rtp)
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
2: Application Layer1 CS 4244: Internet Software Development Dr. Eli Tilevich.
Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.
20-1 Last time □ NAT □ Application layer ♦ Intro ♦ Web / HTTP.
2: Application Layer1 Internet apps: their protocols and transport protocols Application remote terminal access Web file transfer streaming multimedia.
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.
Introduction 1 Lecture 6 Application Layer (HTTP) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science & Engineering.
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
TCOM 509 – Internet Protocols (TCP/IP) Lecture 06_c Application Protocols: HTTP, FTP, SMTP Instructor: Dr. Li-Chuan Chen Date: 10/06/2003 Based in part.
Sockets process sends/receives messages to/from its socket
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.
CIS679: Lecture 13 r Review of Last Lecture r More on HTTP.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
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.
Advance Computer Networks Lecture#05 Instructor: Engr. Muhammad Mateen Yaqoob.
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.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 7 Omar Meqdadi Department of Computer Science and Software Engineering University of.
EEC-484/584 Computer Networks Lecture 4 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
World Wide Web r Most Web pages consist of: m base HTML page, and m several referenced objects addressed by a URL r URL has two components: host name and.
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.
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.
Lecture 5 Internet Core: Protocol layers. Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP 
2: Application Layer 1 Chapter 2 Application Layer These ppt slides are originally from the Kurose and Ross’s book. But some slides are deleted and added.
Block 5: An application layer protocol: HTTP
Application layer 1 Principles of network applications 2 Web and HTTP
Internet transport protocols services
CS4470 Computer Networking Protocols
Computer Communication & Networks
لایه ی کاربرد مظفر بگ محمدی 2: Application Layer.
CS 5565 Network Architecture and Protocols
Presentation transcript:

9/16/2003-9/18/2003 The Application Layer and Java Programming September 16-18, 2003

9/16/2003-9/18/2003 Assignments Homework 2 –Chapter 2 review Finish and Read and 2.9

9/16/2003-9/18/2003 Application Layer Goals –Understand application-layer concepts and protocols Real examples – HTTP, FTP, SMTP –Understand application development Socket programming –CDNs (if time)

9/16/2003-9/18/2003 Application Communication Web Browser Web Server

9/16/2003-9/18/2003 Jargon Process – running program Application-layer protocol – defines communication between processes –HTTP User agent – entity that interfaces with the user and network –Web browser

9/16/2003-9/18/2003 Applications and App-Layer Protocols Web Browser Web Server HTTP UI HTTP … File Access

9/16/2003-9/18/2003 Protocol Stack Web Browser HTTP UI Application Transport Network Link Physical

9/16/2003-9/18/2003 Protocols Define –Types of messages exchanged request/response –Syntax of message types what fields in messages & how fields are delineated –Semantics of the fields meaning of information in fields –Rules for when and how processes send & respond to messages Public-domain protocols –defined in RFCs –allow for interoperability –HTTP, SMTP Proprietary protocols –KaZaA

9/16/2003-9/18/2003 Client-Server Paradigm application transport network data link physical application transport network data link physical Client initiates contact with server typically requests service from server Web: client implemented in browser Server provides requested service to client Web: server sends requested Web page request reply

9/16/2003-9/18/2003 Sockets Interface between app and transport layers Send/receive messages to/from socket API –choice of transport protocol –ability to fix a few parameters (buffer size, etc) 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

9/16/2003-9/18/2003 Sockets Application Transport Network Link Physical Socket

9/16/2003-9/18/2003 Addressing Need ID for receiving host –Unique 32-bit IP address

9/16/2003-9/18/2003 Addressing Need ID for receiving host –Unique 32-bit IP address Need to differentiate between processes –Port number (HTTP is typically port 80)

9/16/2003-9/18/2003 Port Number TCP Web ServerMail Server IP = Port = 25 Port = 80

9/16/2003-9/18/2003 Transport-layer Services Reliability –Do I always need all of my packets to get there? Bandwidth –Do I need a minimum bw guarantee? Timing –Can my messages be delayed?

9/16/2003-9/18/2003 App Protocols and Transport Protocols Application remote terminal access Web file transfer streaming multimedia Internet telephony Application layer protocol SMTP [RFC 2821] Telnet [RFC 854] HTTP [RFC 2616] FTP [RFC 959] proprietary (e.g. RealNetworks) proprietary (e.g., Dialpad) Underlying transport protocol TCP TCP or UDP typically UDP

9/16/2003-9/18/2003 Web and HTTP Web page consists of objects –HTML file, JPEG image, Java applet, audio file,… Example – URL: host name path name

9/16/2003-9/18/2003 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 Server is stateless PC running Explorer Server running Apache Web server Mac running Navigator HTTP request HTTP response

9/16/2003-9/18/2003 HTTP PC running Explorer TCP Open ? OK HTTP GET … Data TCP Close

9/16/2003-9/18/2003 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

9/16/2003-9/18/2003 Nonpersistent HTTP TCP Open ? OK HTTP GET index.htm Data TCP Close TCP Open ? OK HTTP GET sami.jpg Data TCP Close

9/16/2003-9/18/2003 Response Time Modeling RTT – 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 time to transmit file initiate TCP connection RTT request file RTT file received time

9/16/2003-9/18/2003 Persistent HTTP TCP Open ? OK HTTP GET index.htm Data HTTP GET sami.jpg Data TCP Close

9/16/2003-9/18/2003 Persistent HTTP 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 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

9/16/2003-9/18/2003 HTTP Request Message two types of HTTP messages: request, response HTTP request message: –ASCII (human-readable format) GET /somedir/page.html HTTP/1.1 Host: User-agent: Mozilla/4.0 Connection: close Accept-language:fr (extra carriage return, line feed) request line (GET, POST, HEAD commands) header lines Carriage return, line feed indicates end of message

9/16/2003-9/18/2003 Request General Format

9/16/2003-9/18/2003 Input POST method Web page often includes form input Input is uploaded to server in entity body URL method Uses GET method Input is uploaded in URL field of request line

9/16/2003-9/18/2003 Method Types HTTP/1.0 GET POST HEAD –asks 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

9/16/2003-9/18/2003 HTTP Response Message HTTP/ OK Connection close Date: Thu, 06 Aug :00:15 GMT Server: Apache/1.3.0 (Unix) Last-Modified: Mon, 22 Jun 1998 …... Content-Length: 6821 Content-Type: text/html data data data data data... status line (protocol status code status phrase) header lines data, e.g., requested HTML file

9/16/2003-9/18/2003 HTTP Response Status Codes 200 OK –request succeeded, requested object later in this message 301 Moved Permanently –requested object moved, new location specified later in this message (Location:) 400 Bad Request –request message not understood by server 404 Not Found –requested document not found on this server 505 HTTP Version Not Supported

9/16/2003-9/18/2003 User-Server Interaction Server may want to identify users –Why?

9/16/2003-9/18/2003 Authorization –control access to server content Credentials –typically name, password Stateless –client must present authorization in each request client server usual http request msg 401: authorization req. WWW authenticate: usual http request msg + Authorization: usual http response msg usual http request msg + Authorization: usual http response msg time

9/16/2003-9/18/2003 Cookies Four components –1) cookie header line in the HTTP response message –2) cookie header line in HTTP request message –3) cookie file kept on user’s host and managed by user’s browser –4) back-end database at Web site Example: –Susan access Internet always from same PC –She visits a specific e- commerce site for first time –When initial HTTP requests arrives at site, site creates a unique ID and creates an entry in backend database for ID

9/16/2003-9/18/2003 Cookies: Example client server usual http request msg usual http response + Set-cookie: 1678 usual http request msg cookie: 1678 usual http response msg usual http request msg cookie: 1678 usual http response msg cookie- specific action cookie- spectific action server creates ID 1678 for user entry in backend database access Cookie file amazon: 1678 ebay: 8734 Cookie file ebay: 8734 Cookie file amazon: 1678 ebay: 8734 one week later:

9/16/2003-9/18/2003 Conditional GET Goal: don’t send object if client has up- to-date cached version client: specify date of cached copy in HTTP request –If-modified-since: server: response contains no object if cached copy is up-to- date: –HTTP/ Not Modified client server HTTP request msg If-modified-since: HTTP response HTTP/ Not Modified object not modified HTTP request msg If-modified-since: HTTP response HTTP/ OK object modified

9/16/2003-9/18/2003 Assignments Finish reading chapter 2 for next week Finish up Lab 1

9/16/2003-9/18/2003 FTP FTP client contacts FTP server at port 21, specifying TCP as transport protocol Client obtains authorization over control connection Client browses remote directory by sending commands over control connection. When server receives a command for a file transfer, the server opens a TCP data connection to client After transferring one file, server closes connection. FTP client FTP server TCP control connection port 21 TCP data connection port 20 Server opens a second TCP data connection to transfer another file. Control connection: out of band FTP server maintains “state”: current directory, earlier authentication

9/16/2003-9/18/2003 Electronic Mail Three major components –user agents –mail servers –simple mail transfer protocol: SMTP user mailbox outgoing message queue mail server user agent user agent user agent mail server user agent user agent mail server user agent SMTP

9/16/2003-9/18/2003 Example 4) SMTP client sends Alice’s message over the TCP connection 5) Bob’s mail server places the message in Bob’s mailbox 6) Bob invokes his user agent to read message 1) Alice uses UA to compose message and “to” 2) Alice’s UA sends message to her mail server; message placed in message queue 3) Client side of SMTP opens TCP connection with Bob’s mail server user agent mail server mail server user agent

9/16/2003-9/18/2003 Mail Access Protocols SMTP: delivery/storage to receiver’s server (push) Mail access protocol: retrieval from server –POP: Post Office Protocol authorization (agent server) and download –IMAP: Internet Mail Access Protocol more features (more complex) manipulation of stored msgs on server –HTTP: Hotmail, Yahoo! Mail, etc. user agent sender’s mail server user agent SMTP access protocol receiver’s mail server