1 / 11

Relaxed-Currency Serializability

Relaxed-Currency Serializability. Philip A. Bernstein, Microsoft Research Alan Fekete, Univ. of Sydney Hongfei Guo, Microsoft Research Raghu Ramakrishnan, Univ. of Wisconsin Pradeep Tarma, Univ of Wisconsin. To appear in SIGMOD’06. Replication. It is common to keep replicas/caches

vida
Download Presentation

Relaxed-Currency Serializability

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Relaxed-Currency Serializability Philip A. Bernstein, Microsoft Research Alan Fekete, Univ. of Sydney Hongfei Guo, Microsoft Research Raghu Ramakrishnan, Univ. of Wisconsin Pradeep Tarma, Univ of Wisconsin To appear in SIGMOD’06

  2. Replication • It is common to keep replicas/caches • Have data close to users at more than one location • To achieve perfect transparent, always consistent replication (1SR), use ROWA with eager propagation of updates • Performance problems (see GHOS in Sigmod 96)

  3. Lazy propagation • Replicas are allowed to be temporarily stale • Changes propagated to replicas separately from user transaction which updates one copy • We assume single master • No need for reconciling incompatible updates • Eventual convergence is assured

  4. Physical Execution Model r User-transaction r Copier w Cache Manager B Cache Manager A Cache B Cache A xA yA xB zB Master Manager w Master Database xM yM zM

  5. User-specified freshness • User indicates their application-specific tolerance for out-of-date information • Currency bound: staleness of information read (measured in time or value) • Consistency bound:drift between several items read • SQL extensions proposed by Guo et al, SIGMOD’04 • proposed for read-only queries

  6. Our contributions • Allow freshness bounds for reads within updater txns • Define correctness • New algorithms to implement this • Proof of correctness • Performance study (simulation)

  7. Motivating example • Txn in E-Commerce application • Examine inventory levels to see whether order likely to be filled without delay • Examine recent history of shipping delays • Estimate delay till delivery • Add to db: what delay estimate was given to user • Perhaps to send warning if this is found to be inaccurate Need not be the very latest

  8. Correctness (RCSR) • Physical system should seem to user like serial execution of an ideal system • “Seems like” by suitable equivalence that understands semantics of copier txns • Ideal system has multiple versions of each item • Each version has valid interval, from commit-timestamp of creating txn to commit-timestamp of next txn to produce a version • Reads non-deterministically choose versions • for which times can be chosen in valid intervals and meeting the constraints, relative to one another (for drift bound)or to commit-timestamp of reading txn (for currency bound)

  9. Implementation Mechanism • Read - get a short-duration read-lock • Gather txn timestamp constraints based on currency constraints on its reads • Write - gets a commit-duration write-lock • Commit - master assigns a timestamp that satisfies the txn’s constraints, or aborts • Validation-like approach, in contrast to many systems which guarantee limits on drift of replicas • Optimizations reduce bookkeeping, validate efficiently • Primary-copy replication lazily propagates updates from master to caches.

  10. Proof technique • First ignore all freshness constraints • Bare synchronization algorithm • Bare RCSR • Test bare-RCSR by acyclicity of graph • Show bare algorithm gives acyclic graph • Corollary: lazy propagation gives essentially the same semantics as read-committed • Show commit validation gives appropriate constraints on reads

  11. Performance study • Reproduce system model of Agrawal-Carey-Livny TODS’87 • With 10s currency bound, performance is similar to read-committed (where no freshness guarantees are made at all) • there is over 50% increase in throughput compared to Guo et al 2004 (where only read-only txns can use the caches for reading, and updater txns run 2PL at master)

More Related