Slide 1Goals of Today’s LectureThe Web – History (I)The Web – History (II)The Web – History (III)Web ComponentsHTML Content: How?URI Content: How?URL Syntax Content: How?HTTP Client-Server: How?HTTP Big PictureClient-to-Server CommunicationClient-to-Server CommunicationServer-to-Client CommunicationServer-to-Client CommunicationWeb Server: Generating a ResponseHTTP Resource Meta-DataHTTP is Stateless Client-Server: How?State in a Stateless Protocol: CookiesPutting All Together Client Server: How?Web BrowserWeb Browser HistoryWeb ServeSlide 24HTTP PerformanceFetch HTTP Items: Stop & WaitImproving HTTP Performance: Concurrent Requests & ResponsesImproving HTTP Performance: Pipelined Requests & ResponsesImproving HTTP Performance: Persistent ConnectionsImproving HTTP PerformanceImproving HTTP Performance: CachingImproving HTTP Performance: Caching on the ClientImproving HTTP Performance: Caching with Reverse ProxiesImproving HTTP Performance: Caching with Forward ProxiesSlide 35Improving HTTP Performance: Caching with CDNs (cont.)Example: AkamaiExample: AkamaiImproving HTTP Performance: Caching vs. ReplicationConclusions1EE 122: The World Wide WebIon StoicaTAs: Junda Liu, DK Moon, David Zatshttp://inst.eecs.berkeley.edu/~ee122/(Materials with thanks to Vern Paxson, Jennifer Rexford,and colleagues at UC Berkeley)2Goals of Today’s LectureMain ingredients of the WebURIs, HTML, HTTPKey properties of HTTPRequest-response, stateless, and resource meta-dataPerformance of HTTPParallel connections, persistent connections, pipeliningWeb componentsClients, proxies, and serversCaching vs. replication3The Web – History (I)1945: Vannevar Bush, Memex: "a device in which an individual stores all his books, records, and communications, and which is mechanized so that it may be consulted with exceeding speed and flexibility" Vannevar Bush (1890-1974) Memex(See http://www.iath.virginia.edu/elab/hfl0051.html)4The Web – History (II)1967, Ted Nelson, Xanadu:A world-wide publishing network that would allow information to be stored not as separate files but as connected literatureOwners of documents would be automatically paid via electronic means for the virtual copying of their documents Coined the term “Hypertext”Ted Nelson5The Web – History (III)World Wide Web (WWW): a distributed database of “pages” linked through Hypertext Transport Protocol (HTTP)First HTTP implementation - 1990 Tim Berners-Lee at CERNHTTP/0.9 – 1991Simple GET command for the WebHTTP/1.0 –1992Client/Server information, simple cachingHTTP/1.1 - 1996 Tim Berners-Lee6Web ComponentsContentObjectsClientsSend requests / Receive responsesServersReceive requests / Send responsesStore or generate the responsesProxiesPlaced between clients and serversAct as a server for the client, and a client to the serverProvide extra functionsCaching, anonymization, logging, transcoding, filtering accessExplicit or transparent (“interception”)7HTML Content: How?A Web page has several componentsBase HTML fileReferenced objects (e.g., images)HyperText Markup Language (HTML)Representation of hypertext documents in ASCII formatWeb browsers interpret HTML when rendering a pageSeveral functions:Format text, reference images, embed hyperlinks (HREF)Straight-forward to learnSyntax easy to understandAuthoring programs can auto-generate HTMLSource almost always available8URI Content: How?Uniform Resource Identifier (URI)Uniform Resource Locator (URL)Provides a means to get the resourcehttp://www.ietf.org/rfc/rfc3986.txtUniform Resource Name (URN)Names a resource independent of how to get iturn:ietf:rfc:3986 is a standard URN for RFC 39869URL Syntax Content: How?protocol://hostname[:port]/director ypath/resource(e.g., http://inst.eecs.berkeley.edu/~ee122/fa08/index.html)protocol http, ftp, https, smtp, rtsp, etc.hostname Fully Qualified Domain Name (FQDN), IP addressport Defaults to protocol’s standard porte.g. http: 80/tcp https: 443/tcpdirectory path Hierarchical, often reflecting file systemresource Identifies 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=b10HTTP Client-Server: How?HyperText Transfer Protocol (HTTP)Client-server protocol for transferring resourcesImportant properties:Request-response protocolResource metadataStatelessASCII format% telnet www.cs.berkeley.edu 80GET /istoica/ HTTP/1.0<blank line, i.e., CRLF>11HTTP Big PictureClientServerRequest image 1Transfer image 1Request image 2Transfer image 2Request textTransfer textFinish displaypage12GET /somedir/page.html HTTP/1.1Host: www.someschool.edu User-agent: Mozilla/4.0Connection: close Accept-language: fr (blank line) Client-to-Server CommunicationHTTP Request MessageRequest line: method, resource, and protocol versionRequest headers: provide information or modify requestBody: optional data (e.g., to “POST” data to the server)request lineheader linescarriage return line feedindicates end of messageNot optional13Client-to-Server CommunicationHTTP Request MessageRequest line: method, resource, and protocol versionRequest headers: provide information or modify requestBody: 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 resourcePOST: Update resource, provide input to a program, …Headers include:Useful info for the server (e.g. desired language)14Server-to-Client CommunicationHTTP Response MessageStatus line: protocol version, status code, status phraseResponse headers: provide informationBody: 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 file15Server-to-Client CommunicationHTTP Response MessageStatus line: protocol version, status code, status phraseResponse headers: provide informationBody: optional
View Full Document