http and the dynamic web http and the dynamic web how
play

HTTP and the Dynamic Web HTTP and the Dynamic Web How does the Web - PowerPoint PPT Presentation

HTTP and the Dynamic Web HTTP and the Dynamic Web How does the Web work? How does the Web work? The canonical example in your Web browser Click here here is a Uniform Resource Locator (URL) http://www-cse.ucsd.edu It names the location


  1. HTTP and the Dynamic Web HTTP and the Dynamic Web

  2. How does the Web work? How does the Web work? The canonical example in your Web browser Click here “here” is a Uniform Resource Locator (URL) http://www-cse.ucsd.edu It names the location of an object on a server. [courtesy of Geoff Voelker] voelker@cs.ucsd.edu

  3. In Action… In Action… http://www-cse.ucsd.edu HTTP Client Server • Client uses DNS to resolves name of server ( www-cse.ucsd.edu ) • Establishes an HTTP connection with the server over TCP/IP • Sends the server the name of the object (null) • Server returns the object [Voelker]

  4. Naming and URLs Naming and URLs How should objects be named? • URLs name objects and the virtual locations for those objects. Location is a DNS name, so there’s two more levels of naming and indirection under there. Before hypertext we used to worry about access transparency . • Object name interpretation is up to the server, but it’s often a location in the local file tree. If an object moves, the URL breaks ( dangling reference ). Location-independent names seem like the obvious way to go • Why don’t we use them (e.g., URNs)? • How do we make them work, esp. in the face of mobility? [from Voelker, with additions]

  5. Protocols Protocols What kind of transport protocol should the Web use? HTTP 1.0 • One TCP connection/object • Complaints: inefficient, slow, burdensome… HTTP 1.1 • One TCP connection/many objects (persistent connections) • Solves all problems, right? Huge amount of complexity Clients, proxies, servers How do they compare? • Protocol differences [Krishnamurthy99], performance comparison [Nielsen97], effects on servers [Manley97], overhead of TCP connections [Caceres98] HTTPS: HTTP with encryption [Voelker]

  6. HTTP in a Nutshell HTTP in a Nutshell ������������������������������������� ������������������������������������������������ Client Server(s) HTTP supports request/response message exchanges of arbitrary length. Small number of request types: basically GET and POST, with supplements. object name, + content for POST optional query string optional request headers Responses are self-typed objects ( documents ) with various attributes and tags. optional cookies optional response headers

  7. Scalable Servers Scalable Servers Server • Of course, you are not the only person accessing the server…

  8. Web Caching Web Caching Clients Proxy Cache Servers • Gee, is there some way to offload those busy servers? • Use caches to exploit reference locality among clients [Voelker]

  9. Caching Caching How should we build caching systems for the Web? • Seminal paper [Chankhunthod96] • Proxy caches [Duska97] • Akamai hack [Karger99] • Cooperative caching [Tewari99, Fan98, Wolman99] • Popularity distributions [Breslau99] [Voelker]

  10. Issues for Web Caching Issues for Web Caching • binding clients to proxies, handling failover manual configuration, router-based “transparent caching”, WPAD (Web Proxy Automatic Discovery) • proxy may confuse/obscure interactions between server and client • consistency management At first approximation the Web is a wide-area read-only file service...but it is much more than that. caching responses vs. caching documents deltas [Mogul+Bala/Douglis/Misha/others@research.att.com] • prefetching, scale, request routing, scale, performance Web caching vs. content distribution (e.g., Akamai) A few weeks from now...

  11. HTTP 1.1 HTTP 1.1 Specification effort started in W3C, finished in IETF....much later. A number of research works influenced the specification. HTTP 1.0 shows the importance of careful specification. • performance persistent connections with pipelining range requests, incremental update, deltas • caching cache control headers • negotiation of content attributes and encodings • content attributes vs. transport attributes transport encodings for transmission through proxies • Trailer header and trailer headers

  12. Persistent Connections Persistent Connections There are three key performance reasons for persistent connections: • connection setup overhead • TCP slow start : just do it and get it over with • pipelining as an alternative to multiple connections And some new complexities resulting from their use, e.g.: • request/response framing and pairing • unexpected connection breakage Just ask anyone from Akamai... • large numbers of active connections How long to keep connections around? These motivations and issues manifest in HTTP, but they are fundamental for request/response messaging over TCP.

  13. Cookies Cookies HTTP cookies (RFC2109) have brought us a better Web. • S optionally includes arbitrary state as a cookie in a response. • Cookie is opaque to C , but C saves the cookie. • C sends the saved cookie in future requests to S , and possibly to other servers as well. • Allows stateful servers for sessions, personalized content, etc. But: cookies raise privacy and security issues. • What did S put in that cookie? Can anyone else see it? How much space does it take up on my disk that I paid soooo much for? • Cookies may allow third parties who are friends of S 1 ,..., S N to observe C ’s movements among S 1 ,..., S N . Unverifiable transactions , e.g., DoubleClick and other ad services.

  14. Unverifiable Transactions Unverifiable Transactions GET x GET ad Referer mycfo.com ad, cookie c mycfo.com GET y GET ad, cookie c Referer amazon.com/ x ad Client doubleclick, akamai, etc. amazon.com • Users may not know that they are interacting with DoubleClick. Amazon and MyCFO trust DoubleClick, but client is ignorant. • The user visits pages at many sites that reference DoubleClick. • DoubleClick’s cookie allows it to associate all the requests from a given user. • If the browser sends Referer headers, DoubleClick may gather information about all the sites the user visits that reference DoubleClick.

  15. Web Cache Consistency Web Cache Consistency “Requirements of performance, availability, and disconnected operation require us to relax the goal of semantic transparency.” - HTTP 1.1 specification Any caching/replication framework must take steps to ensure that the cache does not deliver old copies of modified objects. Issues for cache consistency in the Web: • large number of clients/proxies • most static objects don’t change very often • weaker consistency requirements Stale information might be OK, as long as it is “not too stale”.

  16. Cache Expiration and Validation Cache Expiration and Validation GET x GET x x , Last-Modified m GET x Expires t GET x GET x If-Modified-Since m Proxy Origin Clients 304: Not Modified Server HTTP 1.0 cache control • Origin server may add a “freshness date” ( Expires ) response header. ...or the cache could determine expiration time heuristically. • Proxy must revalidate cache entry if it has expired. Last-Modified and If-Modified-Since • Whose clock do we use for absolute expiration times?

  17. Expiration and Validation in HTTP 1.1 Expiration and Validation in HTTP 1.1 GET x GET x x , ETag v max-age t GET x Age < t GET x GET x If-None-Match v Age = 0 Proxy Origin Clients 304: Not Modified, ETag v Server HTTP 1.1 cache control allows origin server to: • use relative instead of absolute expiration times ( max-age ); • issue opaque validators ( ETag for entity tag) instead of timestamps; Origin server may specify which of several cached entries to use.

  18. Other 1.1 Cache Control Features Other 1.1 Cache Control Features • Client may specify that no caching is to occur. private or no-store • Vary headers allow server to specify that certain request headers must also match if the proxy deems a cached response valid. language, character set, etc. • Server may specify that a response is not cacheable. Pragma: no-cache header since HTTP 1.0 • Client may explicitly request the proxy to validate the response. Pragma: no-cache • Proxy may/should/must tell client the age of a cached response. Age header • Proxy may/should/must tell client that it could not validate a non- fresh cached response with the origin server. Warning header

  19. The Dynamic Web The Dynamic Web �������������������������� execute program ������������������������������������� Client Server(s) HTTP began as a souped-up FTP that supports hypertext URLs. Service builders rapidly began using it for dynamically-generated content. Web servers morphed into Web Application Servers . Common Gateway Interface (CGI) Java Servlets and JavaServer Pages (JSP) Microsoft Active Server Pages (ASP) Microsoft ASPs are not to be confused with Application Service Providers (ASPs).

  20. Multi- -tier Services tier Services Multi JNDI, JDBC,SQL relational HTTP HTTP RPC, RMI databases IIOP Clients Web DCOM, EJB, application CORBA, etc. HTML+forms, server applets, JavaScript, etc. file servers middle tiers e.g., component “middleware” transaction monitors

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend