Presentation is loading. Please wait.

Presentation is loading. Please wait.

CAP Theorem Justin DeBrabant CIS 570 - Advanced Systems - Fall 2013.

Similar presentations


Presentation on theme: "CAP Theorem Justin DeBrabant CIS 570 - Advanced Systems - Fall 2013."— Presentation transcript:

1 CAP Theorem Justin DeBrabant CIS 570 - Advanced Systems - Fall 2013

2 Properties of Distributed Systems Consistency – all nodes have up-to-date view of data Availability – every request receives a response Partition Tolerance – system will continue to function if partitions are isolated from each other Question: Is there a tradeoff here? CIS 570 - Advanced Systems - Fall 2013

3 ACID Atomicity – all or nothing Consistency – data is always in a valid state Isolation – concurrently executing transactions are isolated Durability – once committed, changes made by transaction are permanent CIS 570 - Advanced Systems - Fall 2013

4 BASE Basically Available Soft-state Eventual Consistency – Forfeits the “C” and “I” of ACID in return for availability – most NoSQL systems provide BASE instead of ACID guarantees CIS 570 - Advanced Systems - Fall 2013

5 ACID vs. BASE ACID – Focuses on consistency and isolation BASE – weak consistency data can be stale – availability first – simpler implementation – faster is this always true? CIS 570 - Advanced Systems - Fall 2013

6 CAP Theorem “At most two.” – you can have at most two of the CAP properties for any shared data system Disclaimer: – some question the assumptions used to prove the “theorem” – thoughts? CIS 570 - Advanced Systems - Fall 2013

7

8 Consistency + Availability Give up partitions Characteristics – two-phase commit – cache validation protocols Example – single-site databases CIS 570 - Advanced Systems - Fall 2013

9 Consistency + Partitions Give up availability Characteristics – pessimistic locking Example – distributed databases CIS 570 - Advanced Systems - Fall 2013

10 Availability + Partitions Give up consistency Characteristics – optimistic concurrency control – conflict resolution protocols Example – web caching – DNS – NoSQL systems CIS 570 - Advanced Systems - Fall 2013

11 Take-Homes In real-world systems, there are (probably) tradeoffs Which do you tradeoff? – depends on… workload data users – requires a deep understanding of the choices available In reality, systems all along this spectrum are useful in different ways CIS 570 - Advanced Systems - Fall 2013

12 Questions? CIS 570 - Advanced Systems - Fall 2013


Download ppt "CAP Theorem Justin DeBrabant CIS 570 - Advanced Systems - Fall 2013."

Similar presentations


Ads by Google