Today: World Wide Web

Similar documents
Today: World Wide Web. Traditional Web-Based Systems

Today: World Wide Web! Traditional Web-Based Systems!

Last Class: Consistency Models. Today: Implementation Issues

Electronic Payment Systems (1) E-cash

Replication. Consistency models. Replica placement Distribution protocols

DTCC Web Services Implementation

Consistency and Replication. Why replicate?

Web-Based Systems. INF 5040 autumn lecturer: Roman Vitenberg

CPE731 Distributed System Models

Chapter 6: Distributed Systems: The Web. Fall 2012 Sini Ruohomaa Slides joint work with Jussi Kangasharju et al.

Distributed Systems Principles and Paradigms. Chapter 12: Distributed Web-Based Systems

Department of Computer Science Institute for System Architecture, Chair for Computer Networks. Caching, Content Distribution and Load Balancing

Modelling and Analysis of Push Caching

Implementation Issues. Remote-Write Protocols

Consistency and Replication

Computer Networks. HTTP and more. Jianping Pan Spring /20/17 CSC361 1

CS 194: Distributed Systems WWW and Web Services

Replication in Distributed Systems

Consistency & Replication

Today: Fault Tolerance. Replica Management

Computer Networks. Wenzhong Li. Nanjing University

Cooperative Leases: Scalable Consistency Maintenance in Content Distribution Networks

Goals. Facebook s Scaling Problem. Scaling Strategy. Facebook Three Layer Architecture. Workload. Memcache as a Service.

05 Indirect Communication

Seminar on. By Sai Rahul Reddy P. 2/2/2005 Web Caching 1

Eventual Consistency. Eventual Consistency

Traditional Web Based Systems

Replication architecture

Venugopal Ramasubramanian Emin Gün Sirer SIGCOMM 04

Web as a Distributed System

Consistency and Replication 1/62

SOAP. Jasmien De Ridder and Tania Van Denhouwe

REST Easy with Infrared360

Outline Computer Networking. HTTP Basics (Review) How to Mark End of Message? (Review)

Democratizing Content Publication with Coral

LECTURE 9. Ad hoc Networks and Routing

Send me up to 5 good questions in your opinion, I ll use top ones Via direct message at slack. Can be a group effort. Try to add some explanation.

Consistency and Replication (part b)

Engineering server driven consistency for large scale dynamic web services

Replication and Consistency. Fall 2010 Jussi Kangasharju

Last Class: RPCs and RMI. Today: Communication Issues

CS555: Distributed Systems [Fall 2017] Dept. Of Computer Science, Colorado State University

04 Webservices. Web APIs REST Coulouris. Roy Fielding, Aphrodite, chp.9. Chp 5/6

Goal: Offer practical information to help the architecture evaluation of an SOA system. Evaluating a Service-Oriented Architecture

Simple Object Access Protocol (SOAP) Reference: 1. Web Services, Gustavo Alonso et. al., Springer

416 Distributed Systems. March 23, 2018 CDNs

EARM: An Efficient and Adaptive File Replication with Consistency Maintenance in P2P Systems.

Web, HTTP, Caching, CDNs

Consistency and Replication 1/65

Distributed System: Definition

Democratizing Content Publication with Coral

Distributed Systems. Characteristics of Distributed Systems. Lecture Notes 1 Basic Concepts. Operating Systems. Anand Tripathi

Distributed Systems. Characteristics of Distributed Systems. Characteristics of Distributed Systems. Goals in Distributed System Designs

INF5750. RESTful Web Services

SOAP Routing and Processing Concepts. Marlon Pierce, Bryan Carpenter, Geoffrey Fox Community Grids Lab Indiana University

Architectural patterns and models for implementing CSPA

Server Selection Mechanism. Server Selection Policy. Content Distribution Network. Content Distribution Networks. Proactive content replication

NFS: Naming indirection, abstraction. Abstraction, abstraction, abstraction! Network File Systems: Naming, cache control, consistency

CS 470 Spring Distributed Web and File Systems. Mike Lam, Professor. Content taken from the following:

Chapter 4: Distributed Systems: Replication and Consistency. Fall 2013 Jussi Kangasharju

CS 470 Spring Distributed Web and File Systems. Mike Lam, Professor. Content taken from the following:

The Chubby Lock Service for Loosely-coupled Distributed systems

CSE/EE 461 HTTP and the Web

CONSISTENCY IN DISTRIBUTED SYSTEMS

Last Class: Web Caching. Today: More on Consistency

Scalable overlay Networks

Chapter 3: Naming Page 38. Clients in most cases find the Jini lookup services in their scope by IP

Today CSCI Coda. Naming: Volumes. Coda GFS PAST. Instructor: Abhishek Chandra. Main Goals: Volume is a subtree in the naming space

Content Delivery on the Web: HTTP and CDNs

Sriram Krishnan, Ph.D. NBCR Summer Institute, August 2010

EEC-682/782 Computer Networks I

EECS 122: Introduction to Computer Networks DNS and WWW. Internet Names & Addresses

PowerBuilder User Regional Seminar Barcelona, Spain. Hotel NH Sants Barcelona DISCLAIMER

Replication Mechanism of ZEMIS Ref

Chapter Outline. Chapter 2 Distributed Information Systems Architecture. Distributed transactions (quick refresh) Layers of an information system

Distributed Systems COMP 212. Revision 2 Othon Michail

CS603: Distributed Systems

WWW, REST, and Web Services

ReST 2000 Roy Fielding W3C

Part 12 殷亚凤. Homepage: Room 301, Building of Computer Science and Technology

Consistency and Replication

Consistency and Replication. Some slides are from Prof. Jalal Y. Kawash at Univ. of Calgary

S. Narravula, P. Balaji, K. Vaidyanathan, H.-W. Jin and D. K. Panda. The Ohio State University

CompSci 356: Computer Network Architectures Lecture 21: Overlay Networks Chap 9.4. Xiaowei Yang

CSE 123b Communications Software

The World Wide Web. Distributed Computing Systems. References. Outline 5/2/2014. The Web. Architecture Processes Caching Web 2.0

Electronic Mail. Three Components: SMTP SMTP. SMTP mail server. 1. User Agents. 2. Mail Servers. 3. SMTP protocol

Lecture 6 Consistency and Replication

Dynamic Metadata Management for Petabyte-scale File Systems

Simple Object Access Protocol (SOAP)

Data Management in Application Servers. Dean Jacobs BEA Systems

Electronic Mail Paradigm

殷亚凤. Processes. Distributed Systems [3]

Internet Technology. 06. Exam 1 Review Paul Krzyzanowski. Rutgers University. Spring 2016

Web Services Chapter 9 of Coulouris

Distributed Architectures & Microservices. CS 475, Spring 2018 Concurrent & Distributed Systems

Network File Systems

COMP6218: Content Caches. Prof Leslie Carr

Time and Space. Indirect communication. Time and space uncoupling. indirect communication

Distributed Systems Exam 1 Review Paul Krzyzanowski. Rutgers University. Fall 2016

Transcription:

Today: World Wide Web WWW principles Case Study: web caching as an illustrative example Invalidate versus updates Push versus Pull Cooperation between replicas Lecture 22, page 1

Traditional Web-Based Systems The overall organization of a traditional Web site. Lecture 22, page 2

Processes Clients The logical components of a Web browser. Lecture 22, page 3

Processes Clients Using a Web proxy when the browser does not speak FTP (or for caching) Lecture 22, page 4

The Apache Web Server The general organization of the Apache Web server. Lecture 22, page 5

Multitiered Architectures The principle of using server-side CGI programs. Lecture 22, page 6

Web Server Clusters The principle of using a server cluster in combination with a front end to implement a Web service. Lecture 22, page 7

Web Server Clusters (2) A scalable content-aware cluster of Web servers. Lecture 22, page 8

Web Documents Six top-level MIME types and some common subtypes. Lecture 22, page 9

HTTP Connections Using nonpersistent connections. Lecture 22, page 10

HTTP Connections (b) Using persistent connections. Lecture 22, page 11

HTTP Methods Operations supported by HTTP. Lecture 22, page 12

Web Services Fundamentals The principle of a Web service. Lecture 22, page 13

Simple Object Access Protocol An example of an XML-based SOAP message. Lecture 22, page 14

RESTful Web Services SOAP heavy-weight protocol for web-based distributed computing RESTful web service: lightweight, point-to-point XML comm REST=representative state transfer HTTP GET => read HTTP POST => create, update, delete HTTP PUT => create, update HTTP DELETE => delete Simpler than RPC-sytle SOAP closer to the web Lecture 22, page 15

RESTful Example GET /StockPrice/IBM HTTP/1.1 Host: example.org Accept: text/xml Accept-Charset: utf-8 HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: nnn <?xml version="1.0"?> <s:quote xmlns:s="http://example.org/stock-service"> <s:tickersymbol>ibm</s:tickersymbol> <s:stockprice>45.25</s:stockprice> </s:quote> Lecture 22, page 16

Corresponding SOAP Call GET /StockPrice HTTP/1.1 Host: example.org Content-Type: application/soap+xml; charset=utf-8 Content-Length: nnn <?xml version="1.0"?> <env:envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:s="http://www.example.org/stock-service"> <env:body> <s:getstockquote> <s:tickersymbol>ibm</s:tickersymbol> </s:getstockquote> </env:body> </env:envelope> HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: nnn <?xml version="1.0"?> <env:envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:s="http://www.example.org/stock-service"> <env:body> <s:getstockquoteresponse> <s:stockprice>45.25</s:stockprice> </s:getstockquoteresponse> </env:body> </env:envelope> Lecture 22, page 17

SOAP vs RESTful WS Language, platform and transport agnostic Supports general distributed computing Standards based (WSDL, UDDI dir. service...) Builtin error handling Extensible More heavy-weight Harder to develop Language and platform agnostic Point-to-point only; no intermediaries Lack of standards support for security, reliability ( roll you own Simpler, less learning curve, less reliance on tools Tied to HTTP transport layer More concise Lecture 22, page 18

Web Proxy Caching The principle of cooperative caching. Lecture 22, page 19

Web Caching Example of the web to illustrate caching and replication issues Simpler model: clients are read-only, only server updates data browser request response Web server browser request response Web Proxy cache request response Web server Lecture 22, page 20

Consistency Issues Web pages tend to be updated over time Some objects are static, others are dynamic Different update frequencies (few minutes to few weeks) How can a proxy cache maintain consistency of cached data? Send invalidate or update Push versus pull Lecture 22, page 21

Push-based Approach Server tracks all proxies that have requested objects If a web page is modified, notify each proxy Notification types Indicate object has changed [invalidate] Send new version of object [update] How to decide between invalidate and updates? Pros and cons? One approach: send updates for more frequent objects, invalidate for rest proxy push Web server Lecture 22, page 22

Push-based Approaches Advantages Provide tight consistency [minimal stale data] Proxies can be passive Disadvantages Need to maintain state at the server Recall that HTTP is stateless Need mechanisms beyond HTTP State may need to be maintained indefinitely Not resilient to server crashes Lecture 22, page 23

Pull-based Approaches proxy poll response Web server Proxy is entirely responsible for maintaining consistency Proxy periodically polls the server to see if object has changed Use if-modified-since HTTP messages Key question: when should a proxy poll? Server-assigned Time-to-Live (TTL) values No guarantee if the object will change in the interim Lecture 22, page 24

Pull-based Approach: Intelligent Polling Proxy can dynamically determine the refresh interval Compute based on past observations Start with a conservative refresh interval Increase interval if object has not changed between two successive polls Decrease interval if object is updated between two polls Adaptive: No prior knowledge of object characteristics needed Lecture 22, page 25

Pull-based Approach Advantages Implementation using HTTP (If-modified-Since) Server remains stateless Resilient to both server and proxy failures Disadvantages Weaker consistency guarantees (objects can change between two polls and proxy will contain stale data until next poll) Strong consistency only if poll before every HTTP response More sophisticated proxies required High message overhead Lecture 22, page 26

A Hybrid Approach: Leases Lease: duration of time for which server agrees to notify proxy of modification Issue lease on first request, send notification until expiry Need to renew lease upon expiry Smooth tradeoff between state and messages exchanged Zero duration => polling, Infinite leases => server-push Efficiency depends on the lease duration Get + lease req Client read Proxy Reply + lease Server Invalidate/update Lecture 22, page 27

Policies for Leases Duration Age-based lease Based on bi-modal nature of object lifetimes Larger the expected lifetime longer the lease Renewal-frequency based Based on skewed popularity Proxy at which objects is popular gets longer lease Server load based Based on adaptively controlling the state space Shorter leases during heavy load Lecture 22, page 28

Cooperative Caching Caching infrastructure can have multiple web proxies Proxies can be arranged in a hierarchy or other structures Overlay network of proxies: content distribution network Proxies can cooperate with one another Answer client requests Propagate server notifications Lecture 22, page 29

Hierarchical Proxy Caching Server HTTP Parent ICP 3 HTTP Leaf Caches ICP 2 ICP Clients HTTP 1 Read A Examples: Squid, Harvest Lecture 22, page 30

Locating and Accessing Data Server for B Read A Node Y (A,X) Get A Node X Get B Node Z Caches Read B Clients Minimize cache hops on hit Do not slow down misses Properties Lookup is local Hit at most 2 hops Miss at most 2 hops (1 extra on wrong hint) Lecture 22, page 31

CDN Issues Which proxy answers a client request? Ideally the closest proxy Akamai uses a DNS-based approach Propagating notifications Can use multicast or application level multicast to reduce overheads (in push-based approaches) Active area of research Numerous research papers available Lecture 22, page 32

Adjustment Measures The principal working of the Akamai CDN. Lecture 22, page 33

Replication of Web Applications Figure 12-21. Alternatives for caching and replication with Web applications. Lecture 22, page 34