DOC PREVIEW
Berkeley ELENG 122 - The World Wide Web

This preview shows page 1-2-3 out of 8 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

11The World Wide WebEE 122: Intro to Communication NetworksFall 2007 (WF 4-5:30 in Cory 277)Lisa Fowler / Vern PaxsonTAs: Lisa Fowler, Daniel Killebrew, Jorge Ortizhttp://inst.eecs.berkeley.edu/~ee122/Materials with thanks to Vern Paxson, Jennifer Rexford,Ion Stoica, and colleagues at Princeton and UC Berkeley2Announcements• Project #1 - Milestone 1– Due 11pm Tonight– No slip days!• Homework #2– Out now– *Hard* deadline of 11PM Tues Oct 9• First Midterm coming soon…– Fri Oct 123Goals of Today’s Lecture• Main ingredients of the Web– URIs, HTML, HTTP• Key properties of HTTP– Request-response, stateless, and resource meta-data• Performance of HTTP– Parallel connections, persistent connections, pipelining• Web components– Clients, proxies, and servers– Caching vs. replication4The World Wide Web5Web Components• Content– Objects• Clients– Send requests / Receive responses• Servers– Receive requests / Send responses– Store or generate the responses• Proxies– Placed between clients and servers Act as a server for the client, and a client to the server– Provide extra functions Caching, anonymization, logging, transcoding, filtering access– Explicit or transparent (“interception”)6HTML Content: How?• A Web page has several components– Base HTML file– Referenced objects (e.g., images)• HyperText Markup Language (HTML)– Representation of hypertext documents in ASCII format– Web browsers interpret HTML when rendering a page– Several functions: Format text, reference images, embed hyperlinks (HREF)• Straight-forward to learn– Syntax easy to understand– Authoring programs can auto-generate HTML– Source almost always available27URI Content: How?Uniform Resource Identifier (URI)– Uniform Resource Locator (URL) Provides a means to get the resource http://www.ietf.org/rfc/rfc3986.txt– Uniform Resource Name (URN) Names a resource independent of how to get it urn:ietf:rfc:3986 is a standard URN for RFC 39868URL Syntax Content: How?protocol://hostname[:port]/directorypath/resourceIdentifies the desired resourceCan also extend to program executions:http://us.f413.mail.yahoo.com/ym/ShowLetter?box=%40B%40Bulk&MsgId=2604_1744106_29699_1123_1261_0_28917_3552_1289957100&Search=&Nhead=f&YY=31454&order=down&sort=date&pos=0&view=a&head=bresourceHierarchical, often reflecting file systemdirectory pathDefaults to protocol’s standard porte.g. http: 80/tcp https: 443/tcpportFQDN, IP addresshostnamehttp, ftp, https, smtp, rtsp, etc.protocol9HTTP Client-Server: How?• HyperText Transfer Protocol (HTTP)–Client-server protocol for transferring resources• Important properties:–Request-response protocol–Reliance on a global URI namespace–Resource metadata–Stateless–ASCII format% telnet www.icir.org 80GET /vern/ HTTP/1.0<blank line, i.e., CRLF>10GET /somedir/page.html HTTP/1.1Host: www.someschool.edu User-agent: Mozilla/4.0Connection: close Accept-language: fr (blank line) Client-to-Server Communication• HTTP Request Message– Request line: method, resource, and protocol version– Request headers: provide information or modify request– Body: optional data (e.g., to “POST” data to the server)request lineheader linescarriage return line feedindicates end of messageNotNot optional11Client-to-Server Communication• HTTP Request Message– Request line: method, resource, and protocol version– Request headers: provide information or modify request– Body: optional data (e.g., to “POST” data to the server)• Request methods include:– GET: Return current value of resource, run program, …– HEAD: Return the meta-data associated with a resource– POST: Update resource, provide input to a program, …• Headers include:– Useful info for the server e.g. desired language12Server-to-Client Communication• HTTP Response Message– Status line: protocol version, status code, status phrase– Response headers: provide information– Body: optional dataHTTP/1.1 200 OK Connection closeDate: Thu, 06 Aug 2006 12:00:15 GMT Server: Apache/1.3.0 (Unix) Last-Modified: Mon, 22 Jun 2006 ... Content-Length: 6821 Content-Type: text/html(blank line) data data data data data ... status line(protocol, status code,status phrase)header linesdatae.g., requested HTML file313Server-to-Client Communication• HTTP Response Message– Status line: protocol version, status code, status phrase– Response headers: provide information– Body: optional data• Response code classes– Similar to other ASCII app. protocols like SMTPExampleClassCodeServer errorClient errorRedirectionSuccessInformational503 Service Unavailable5xx404 Not Found4xx304 Not Modified3xx200 OK2xx100 Continue1xx14Web Server: Generating a Response• Return a file– URL matches a file (e.g., /www/index.html)– Server returns file as the response– Server generates appropriate response header• Generate response dynamically– URL triggers a program on the server– Server runs program and sends output to client• Return meta-data with no body15HTTP Resource Meta-Data• Meta-data– Info about a resource– A separate entity• Examples:– Size of a resource– Last modification time– Type of the content Data format classification•e.g., Content-Type: text/html Enables browser to automatically launch an appropriate viewer Borrowed from e-mail’s Multipurpose Internet Mail Extensions (MIME)• Usage example: Conditional GET Request– Client requests object “If-modified-since”– If object hasn’t changed, server returns “HTTP/1.1 304 NotModified”– No body in the server’s response, only a header16HTTP is Stateless Client-Server: How?• Stateless protocol– Each request-response exchange treated independently– Servers not required to retain state• This is good– Improves scalability on the server-side Don’t have to retain info across requests Can handle higher rate of requests Order of requests doesn’t matter• This is bad– Some applications need persistent state Need to uniquely identify user or store temporary info e.g., Shopping cart, user preferences and profiles, usage tracking, …17State in a Stateless Protocol:Cookies• Client-side state maintenance– Client stores small(?) state on behalf of server– Client sends state in future requests to the server• Can provide authenticationRequestResponseSet-Cookie: XYZRequestCookie: XYZ18State in a


View Full Document

Berkeley ELENG 122 - The World Wide Web

Documents in this Course
Lecture 6

Lecture 6

22 pages

Wireless

Wireless

16 pages

Links

Links

21 pages

Ethernet

Ethernet

10 pages

routing

routing

11 pages

Links

Links

7 pages

Switches

Switches

30 pages

Multicast

Multicast

36 pages

Switches

Switches

18 pages

Security

Security

16 pages

Switches

Switches

18 pages

Lecture 1

Lecture 1

56 pages

OPNET

OPNET

5 pages

Lecture 4

Lecture 4

16 pages

Ethernet

Ethernet

65 pages

Models

Models

30 pages

TCP

TCP

16 pages

Wireless

Wireless

48 pages

Load more
Download The World Wide Web
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view The World Wide Web and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view The World Wide Web 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?