Maintaining Mutual Consistency for Cached Web Objects
Post on 21-Jan-2016
31 Views
Preview:
DESCRIPTION
Transcript
Computer Science
Maintaining Mutual Consistency for Cached Web Objects
Bhuvan Urgaonkar, Anoop Ninan,Mohammad Raunak, Prashant Shenoy,
Krithi Ramamritham
University of Massachusetts, Amherst
http://lass.cs.umass.edu
Computer Science
Introduction
End-stations
Network
Server
Web Proxy
Web Proxy Caching Reduces client response times, bandwidth usage and server load
Time-varying objects => need to maintain consistency Example: Breaking news sections of newspaper sites
Consistency techniques: TTL, server invalidation, client polling All of these techniques focus on individual objects
Computer Science
Our Goal: Mutual Consistency
Many web objects are related to one another Examples:
• Stock prices and stock market indices• Sports scores of individuals and teams
Proxy must present a logically consistent view of related objects
Problem: How to maintain mutual consistency ?
Computer Science
Outline
Motivation Consistency Semantics Consistency Maintenance Techniques Experimental Evaluation Related Work Concluding Remarks
Computer Science
Consistency Taxonomy
Mutual
Consistency
Time Value ValueTime
Individual
Computer Science
Consistency of Individual Objects Strong consistency
The proxy and server always in sync with each other Strong consistency is expensive!
Relax strong consistency: - consistency Time domain: t - consistency
• The proxy never out of sync with the server by more than time units
• Eg: Sports score not stale by more than a minute Value domain: v - consistency
• The difference in the object values at the proxy and the server bound by at all times
• Eg: Only interested in changes larger than $1 to a stock price
Computer Science
Mutual Consistency: Time Domain
Related objects should have existed at the server no more than time units apart
X
Y
X1
Y0 Y1
time
time
Objects X, Y at server:
X0
t
t > t +
Computer Science
Mutual Consistency: Value Domain
Difference of some function of the values of the two objects at server and proxy bound by
Example: With = $1, the difference between two stock prices at proxy within $1 of the difference at server
Computer Science
Individual Consistency:Time Domain
Baseline Approach Have a fixed polling interval of Problem: Wastes network bandwidth when rate of
change slow
LIMD Approach (Linear Increase Multiplicative Decrease) Start by polling once every Object changes but no violations:
• Increase the polling interval by a small linear factor Object does not change:
• Increase the polling interval by a larger linear factor One or more violations occur:
• Decrease the polling interval by a multiplicative factor
Computer Science
Mutual Consistency:Time Domain
LIMD Approach No support for mutual consistency => mutual consistency
violations
LIMD Approach: Poll All An object changes:
• Trigger extra polls for all related objects Advantage: Guarantees mutual consistency Disadvantage: Polls all related objects at the rate of the
fastest changing object => High network overhead
LIMD Approach: Poll Select Track rate of change of objects An object changes:
• Trigger extra polls only for related objects changing at similar or faster rates
Computer Science
Consistency Taxonomy: Summary
Mutual
Consistency
Time Value ValueTime
Individual
Computer Science
Individual Consistency: Value Domain
Track the rate of change of the object value Compute the difference between the object values for
successive polls
Extrapolate using the computed rate to decide when to poll next
Time (min)
Value ($)
Poll (t) Poll (t+1)
1.0
0.5
Actual change in value
Slope = $0.5 / 1 min
Computer Science
Mutual Consistency: Value Domain
Virtual Object Approach Look at the difference in the object values as the
value of a virtual object Use the individual consistency technique for this
virtual object
Partitioned Approach For two related objects A and B, dynamically
partition into two parts A and B
A, B inversely proportional to rates of change of A, B Maintain individual consistency constraints for A, B
Computer Science
Outline
Motivation Consistency Semantics Consistency Maintenance Techniques Experimental Evaluation Related Work Concluding Remarks
Computer Science
Workload Characteristics
Workloads for Temporal Domain Consistency
Trace
CNN Financial News Briefs
NY Times News (AP)
NY Times News (Reuters)
Guardian Breaking News
Avg. Update
Frequency
26.0 min
11.6 min
4.9 min
20.3 min
Stock Name Number of updates
AT&T
Yahoo
653
2204
Workloads for Value Domain Consistency
Computer Science
Performance Metrics
Fidelity The fraction of time the proxy is able to maintain the
consistency guarantee
Number of polls Network overhead
Goal: High fidelity at a low network overhead
Computer Science
Efficacy of the LIMD approach
Significant reduction in number of polls for stringent consistency requirements
Allows a tradeoff between number of polls and fidelity
0
500
1000
1500
2000
2500
3000
0 10 20 30 40 50 60
Number of polls, CNN/FN trace
LIMD ApproachBaseline Approach
Nu
mb
er o
f p
olls
Delta consistency constraint (min)
0
0.2
0.4
0.6
0.8
1
0 10 20 30 40 50 60
Fidelity, CNN/FN trace
LIMD ApproachBaseline Approach
Fid
elit
y
Delta consistency constraint (min)
Computer Science
Adaptive behavior of LIMD approach
Can track the rate of change of object at server
0
10
20
30
40
50
60
70Duration between polls
Du
rati
on
bet
wee
n p
olls
(min
)Time
1 pm 9 pm 5 am 1 pm 9 pm 5 am 0
2
4
6
8
10
12
Nu
mb
er o
f u
pd
ates
per
2 h
ou
rs
Update frequency
1 pm 9 pm 5 am 1 pm 9 pm 5 am
Time
CNN/FN trace, Delta = 10 min
Computer Science
Mutual Consistency in Time Domain
Our heuristic can provide high fidelity with a moderate increase in number of polls
0
100
200
300
400
500
600
0 5 10 15 20 25 30
Number of polls, Delta=10min
LIMD : Poll SelectLIMD : Poll AllBaseline LIMD
Nu
mb
er o
f p
olls
Mutual consistency constraint (min)
0
0.2
0.4
0.6
0.8
1
0 5 10 15 20 25 30
Fidelity, Delta=10 min
LIMD : Poll SelectLIMD : Poll AllBaseline LIMD
Fid
elit
y
Mutual consistency constraint (min)
Computer Science
Mutual Consistency in Value Domain
Can track changing object values effectively
130
135
140
145
150
2600 2650 2700 2750 2800 2850 2900
Virtual Object Approach, Delta=$2.5
ServerProxyD
iffe
ren
ce in
sto
ck p
rice
s ($
)
Time (sec)
Computer Science
Related Work
Consistency mechanisms for individual objects: Weak consistency
• Time To Live values• Adaptive TTR: Srinivasan 1998• Periodic Polling: Cao 1997
Strong consistency• Client Polling: Yin 1999• Server Invalidation: Cao 1997• Adaptive Leases: Duvvuri 2000
Computer Science
Summary
Identified the need for mutual consistency techniques
Adaptive approaches for providing consistency guarantees
Showed small incremental cost of providing mutual consistency guarantees
URL: http://lass.cs.umass.edu/projects/broadway
top related