Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Lazy Database Replication with Snapshot Isolation Khuzaima Daudjee Joint work with Kenneth Salem David R. Cheriton School of.

Similar presentations


Presentation on theme: "1 Lazy Database Replication with Snapshot Isolation Khuzaima Daudjee Joint work with Kenneth Salem David R. Cheriton School of."— Presentation transcript:

1 1 Lazy Database Replication with Snapshot Isolation Khuzaima Daudjee Joint work with Kenneth Salem David R. Cheriton School of Computer Science

2 Khuzaima Daudjee - VLDB Database Replication Centralized System DB transactions Replicated System

3 Khuzaima Daudjee - VLDB Eager vs. Lazy Replication Eager ProtocolsLazy Protocols R1 R2 T1 R1 R2 T1 T2

4 Khuzaima Daudjee - VLDB Transaction Isolation vs. Performance Performance Isolation Level Strong Isolation Low Performance Weak Isolation High Performance

5 Khuzaima Daudjee - VLDB Snapshot Isolation (SI) time commit(T1)start(T2) commit(T2) R[x]W[x]R[x]W[x] → SI allows any earlier database state to be seen

6 Khuzaima Daudjee - VLDB Concurrent Transactions Under SI Two transactions that write at least one common data item First-Committer-Wins (FCW) rule time commit(T1)start(T1) T2 R[y] W[x] R[x] W[y] W[y]

7 Khuzaima Daudjee - VLDB Replica Inconsistency Under SI time T1 T2 T3 Site S2Site S1 T1 T3 sees commit(T1) and commit(T2) DB state T3 time T2 T3 sees only commit(T1) DB state

8 Khuzaima Daudjee - VLDB Replica Consistency: a sequential solution time T1 T2 T3 sees commit(T2) and commit(T1) DB state T3 sequential order does not leverage weaker isolation level At every replicated site:

9 Khuzaima Daudjee - VLDB Transaction Inversion T2 = Status T1 = Reserve client DB T1 T2 T1’s update Lazy Replicated System

10 Khuzaima Daudjee - VLDB Strong SI time T2 commit(T1) T1 sees latest DB state start(T2)

11 Khuzaima Daudjee - VLDB Strong SI and Scalability T2 = Status T1 = Reserve client T1 T2 Lazy Replicated System

12 Khuzaima Daudjee - VLDB Strong Session SI time commit(T1)start(T3)commit(T2) strong session SI imposes constraints between start and commit operations within a session client session A client session B start(T3)

13 Khuzaima Daudjee - VLDB Lazy Master Architecture Update Transactions Lazy Update Propagation Clients Primary Site Secondary Sites (orders updates)

14 Khuzaima Daudjee - VLDB Transaction Relationships → start(T1) < commit(T2) → commit(T2) < start(T3) start(T1) < commit(T2) < start(T3) commit(T1) < commit(T2) time T2 T1 commit(T2)commit(T1) T3

15 Khuzaima Daudjee - VLDB Global SI Clients Primary Site Secondary Site trans propagate in timestamp order T1 schedule updates in order of start and commit ops

16 Khuzaima Daudjee - VLDB Enforcing Strong Session SI Each secondary database state tracks the primary database state → completeness [Zhuge et al] Inversions are possible since secondary DB state may lag behind Session guarantees need to be enforced by ensuring that transaction T2 sees the database state installed by T1

17 Khuzaima Daudjee - VLDB Algorithm Strong Session SI Client Primary Site Secondary Site T1 T1’s update T2 T1 block ?

18 Khuzaima Daudjee - VLDB Performance: Throughput

19 Khuzaima Daudjee - VLDB Performance: Response Time

20 Khuzaima Daudjee - VLDB 2006 Summary Global SI in lazy replicated systems: fully leverage concurrency controls to maintain consistent replicas Strong session SI: a useful and practical way to avoid transaction inversions in lazy replicated database systems Architecture and algorithms for global SI, strong SI and strong session SI in lazy replicated systems


Download ppt "1 Lazy Database Replication with Snapshot Isolation Khuzaima Daudjee Joint work with Kenneth Salem David R. Cheriton School of."

Similar presentations


Ads by Google