Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Jasleen Kaur !
! February 7, 2013 !
1!
!!
regional ISP
company network!
2!
Applications: !
! Communicating, distributed processes! ! Running in network hosts in user space! ! Exchange messages!
local ISP!
!!
Application-layer protocols!
! One piece of an application! ! Denes messages exchanged and actions taken! ! Uses services provided by lower layer protocols!
application ! transport network link physical
company network!
3!
!!
4!
Web page:!
! Addressed by a URL" ! Consists of objects!
!!
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <title>CNN.com</title> <meta http-equiv="refresh" content="1800; URL=http://www.cnn.com/?"> <link rel="StyleSheet" href="http://i.cnn.net/cnn/virtual/2001/style/main.css" type="text/css"> <script language="JavaScript1.1" src="http://i.cnn.net/cnn/virtual/2000/code/main.js" type="text/javascript"> </script> <script language="JavaScript1.1" type="text/javascript"> </script> <script language="JavaScript1.1" src="http://ar.atwola.com/file/adsWrapper.js"></script> <style type="text/css"></style> <script language="JavaScript">document.adoffset=0</script> </head> <body class="cnnMainBody" bgcolor="#FFFFFF"> <a name="top_of_page"></a>
5!
Web Terminology!
www.someSchool.edu:8080/someDept/pic.gif!
Server domain name " Object path name"
!!
URL components!
! Server address! ! (Optional port number)! ! Path name!
6!
Web Terminology!
The Hypertext Transfer Protocol (HTTP)"
Webs application layer protocol! Client/server model!
! client: ! "! browser that requests, receives, displays Web objects! ! server: ! "! Web server sends objects in response to requests!
!! !!
HT TP r
req
ue
st
7!
!!
HTTP is stateless!
! Server maintains no information about past browser requests!
!!
HTTP messages (application -layer protocol messages) exchanged between browser and Web server! HTTP/1.0: RFC 1945!
! One request/response " interaction per connection!
!!
aside!
Protocols that maintain state are complex!! ! Past history (state) must be maintained! ! If server or client crashes, their views of state may be inconsistent and must be reconciled!
!!
!!
8!
!!
!
e1 TP ns po HT s re Web TP HT Server 1 st1 ue q 1 e r e1 TP ns T o p H res TP T H
!!
Server will retrieve and send the HTML le! Browser will read the le and sequentially make 10 separate requests for the embedded JPEG images!
Browser
req
ue
st1
!!
..."
9!
Server!
0) Server process at host
www.someSchool.edu waiting for TCP connections on port 80!
time!
10!
Server!
containing the HTML le. ! !Ten references to JPEG objects are found during the HTML parse!
server at www.someSchool.edu
time!
The above steps are repeated for each of the 10 JPEG objects !
11!
!!
HTTP request message:! ! Request line! method <SP> path <SP> version <CR><LF>" header eld name : value <CR><LF>" ! Optional header lines! header eld name : value <CR><LF>" <CR><LF>" entity body"
"
12!
!!
13!
Response messages!
! ASCII (human-readable format)!
!!
Message structure:!
! Response line! version <SP> code <SP> phrase <CR><LF>" header eld name : value <CR><LF>" ! Optional header lines! ! Requested object, error message message, etc.! header eld name : value <CR><LF>" <CR><LF>" entity body"
"
15!
Request! headers!
Response! headers!
19!