cs743 principles of database management and use
play

CS743 - Principles of Database Management and Use Distribution, - PowerPoint PPT Presentation

CS743 - Principles of Database Management and Use Distribution, Replication, and CAP Ken Salem David R. Cheriton School of Computer Science University of Waterloo Fall 2014 Data Partitioning DBMS Data Partitioning DBMS DBMS DBMS DBMS


  1. CS743 - Principles of Database Management and Use Distribution, Replication, and CAP Ken Salem David R. Cheriton School of Computer Science University of Waterloo Fall 2014

  2. Data Partitioning DBMS

  3. Data Partitioning DBMS DBMS DBMS DBMS

  4. Two Phase Commit (2PC) T R S X DBMS A DBMS B DBMS C 1. UPDATE R

  5. Two Phase Commit (2PC) T T R S X DBMS A DBMS B DBMS C 1. UPDATE R 2. UPDATE S

  6. Two Phase Commit (2PC) T T T R S X DBMS A DBMS B DBMS C 1. UPDATE R 2. UPDATE S 3. UPDATE X

  7. Two Phase Commit (2PC) T T T commit req prepare R S prepare X DBMS A DBMS B DBMS C 1. UPDATE R 2. UPDATE S 3. UPDATE X 4. COMMIT • 2PC phase 1

  8. Two Phase Commit (2PC) T T T ack R S ack X DBMS A DBMS B DBMS C 1. UPDATE R 2. UPDATE S 3. UPDATE X 4. COMMIT • 2PC phase 1

  9. Two Phase Commit (2PC) T T T ack commit R S commit X DBMS A DBMS B DBMS C 1. UPDATE R 2. UPDATE S 3. UPDATE X 4. COMMIT • 2PC phase 1 • 2PC phase 2

  10. Two Phase Commit (2PC) T T T ack R S ack X DBMS A DBMS B DBMS C 1. UPDATE R 2. UPDATE S Strict 2PL at each site plus 2PC 3. UPDATE X ensures global serializability. 4. COMMIT • 2PC phase 1 • 2PC phase 2

  11. Data Replication DBMS

  12. Data Replication DBMS DBMS DBMS DBMS

  13. 1-Copy Serializability (1SR) • correctness criterion suitable for replicated databases • system behaves as if there is a single copy of each object on which transactions appear to execute sequentially in some order

  14. Eager Read One, Write All (ROWA) Replication • to read R , read local replica of R

  15. Eager Read One, Write All (ROWA) Replication • to read R , read local replica of R • to update R , update all replicas of R

  16. Eager Read One, Write All (ROWA) Replication • to read R , read local replica of R • to update R , update all replicas of R • each local site has a local concurrency controller

  17. Eager Read One, Write All (ROWA) Replication • to read R , read local replica of R • to update R , update all replicas of R • each local site has a local concurrency controller • use 2PC to atomically commit transaction updates

  18. Eager Read One, Write All (ROWA) Replication • to read R , read local replica of R • to update R , update all replicas of R • each local site has a local concurrency controller • use 2PC to atomically commit transaction updates Global Serializability Local strict two-phase locking + 2PC for commit coordination is sufficient to ensure global 1SR.

  19. CAP Consistency: serializability Availability: nodes that are up should eventually respond to requests Partition-Tolerance: system should remain consistent and available even if it partitions

  20. CAP Consistency: serializability Availability: nodes that are up should eventually respond to requests Partition-Tolerance: system should remain consistent and available even if it partitions Brewer’s CAP Conjecture (PODC 2000) It is impossible build a [distributed database] system that provides consistency, availability, and partition-tolerance.

Recommend


More recommend