a scalability service for dynamic web applications

16
Olston, Ailamaki, Garrod, Maggs, Manjhi, Mowry, Carnegie Mellon University Conference on Innovative Data System Research, 2005 A Scalability Service for Dynamic Web Applications Raihan Al-Ekram University of Waterloo October 11, 2006

Upload: bradley-david

Post on 03-Jan-2016

32 views

Category:

Documents


3 download

DESCRIPTION

A Scalability Service for Dynamic Web Applications. Olston, Ailamaki, Garrod, Maggs, Manjhi, Mowry, Carnegie Mellon University Conference on Innovative Data System Research, 2005. Raihan Al-Ekram University of Waterloo October 11, 2006. Outline. Scalability Problem A Solution - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: A Scalability Service for  Dynamic Web Applications

Olston, Ailamaki, Garrod, Maggs, Manjhi, Mowry,

Carnegie Mellon University

Conference on Innovative Data System Research, 2005

A Scalability Service for Dynamic Web Applications

Raihan Al-Ekram University of Waterloo

October 11, 2006

Page 2: A Scalability Service for  Dynamic Web Applications

2

Outline

Scalability Problem A Solution Challenges

Proposed System Architecture Operation

Consistency Management Channel-By-Query Channel-By-Update

View Invalidation Strategies Conclusion Discussion

Page 3: A Scalability Service for  Dynamic Web Applications

3

Scalability Problem

Sudden Popularity Spikes Slashdot effect

Civic Emergency 9/11, Hurricane Katrina

Page 4: A Scalability Service for  Dynamic Web Applications

4

A Solution

Scalability as a Third Party Service Content Distribution Network

Page 5: A Scalability Service for  Dynamic Web Applications

5

Challenges

Strong Consistency Inconsistency could cost lives Precludes TTL based caching

Ownership of Data Security concerns Data corruption risks Precludes distributed data replication Invalidate cache instead of updating

Page 6: A Scalability Service for  Dynamic Web Applications

6

Observations

Read domination Modifications only in Home Servers

Predefined Query and Update Templates Cache invalidation based on query/update independence

analysis Strong cache consistency

Page 7: A Scalability Service for  Dynamic Web Applications

7

System Architecture

Page 8: A Scalability Service for  Dynamic Web Applications

8

System Operation

Fixed set of query and update templates at the proxy servers

Statically analyze the templates for conflicting query templates for each update template

When an update template is instantiated, all proxies containing an instantiation of a conflicting query template is notified for invalidation

Query template instantiations are organized in multicast groups and notifications are sent to only to proper multicast groups

Page 9: A Scalability Service for  Dynamic Web Applications

9

Consistency Management

Update Templates1. insert into inv values (name=?, id=?, qty=?, date=now())2. update inv set qty=? Where id=?

Query Templates1. select qty from inv where name=?2. Select * from inv where date>?3. select * from inv where qty<?

Page 10: A Scalability Service for  Dynamic Web Applications

10

Channel-By-Query

Multicast Channels One per query template, parameter independent

o Q1-PI, Q2-PI, Q3-PI One per parameter binding of an equality comparison

o Q1-PS1, Q1-PS2, Q1-PS3 …

Query Template Instantiation Subscribe own channels

o Q1: Q1-PI , Q1-PSx o Q2: Q2-PI o Q3: Q3-PI

Update Template Instantiation Notify conflicting query channels

o U1: Q1-PSx, Q2-PI, Q3-PIo U2: Q1-PI, Q2-PI, Q3-PI

Receive Notification Unsubscribe channels

Page 11: A Scalability Service for  Dynamic Web Applications

11

Channel-By-Update

Multicast Channels One per update template, parameter independent

o U1-PI, U2-PI One per parameter binding

o U1-PS1, U1-PS2, …, U2-PS1, U2-PS2, … Query Template Instantiation

Subscribe conflicting update channelso Q1: U1-PSx, U2-PIo Q2: U1-PI, U2-PIo Q3: U1-PI, U2-PI

Update Template Instantiation Notify own channels

o U1: U1-PSx, U1-PIo U2: U2-PI

Receive Notification Unsubscribe to channels

Page 12: A Scalability Service for  Dynamic Web Applications

12

Comparison

Channel-By-Query Fewer channel subscriptions More multicast messages

Channel-By-Update More channel subscriptions Fewer multicast messages

Page 13: A Scalability Service for  Dynamic Web Applications

13

View Invalidation

Strategies Black-box, only query and update available View-Inspection, access to cache data is also available Full-Access, access to base data is also available

Example Books (Title, Author, Subject) Authors (Author, Award, Country)

Page 14: A Scalability Service for  Dynamic Web Applications

14

View Invalidation

View create view MyView (Author, Award) as

select A.Author, B.Awardfrom Authors A, Books Bwhere A.Author=B.Author and

A.Country=“USA” and B.Subject=“History”

Updates1. update Authors

set Country=“France”where Author=“Tocqueville”

2. update Booksset Subject=“Fiction”where Tilte=“Napoleon’s Television”

Can benefit from view-inspection if there is no Author=“Tocqueville”

Can benefit from full-access if before the update Subject “History”

Page 15: A Scalability Service for  Dynamic Web Applications

15

Conclusion

Ongoing work Scalable and consistent data caching Co-operative caches Minimal home server involvement

Page 16: A Scalability Service for  Dynamic Web Applications

16

Discussion

How are the updates in the home servers propagated to the proxies?

How do the proxies determine if the client requested data is in the cache?

Can this scheme provide 1SR or SI guarantee?