Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
CAP Theorem The art of choice   @mlomnicki
CAP Theorem           by Eric Brewer in 2000Proven in 2002 by Seth Gilbert & Nancy Linch
CAP Theorem             Consistency             Availability             Partition toleranceAt most 2 of 3 properties may ...
CAP Theorem
RDBMS (single-site and cluster)           Consistency             Availability         Partition tolerance
Distributed RDBMS     Consistency       Availability   Partition tolerance
NoSQL  Consistency    AvailabilityPartition tolerance    ...also DNS is AP
BigTable  Consistency   AvailabilityPartition tolerance    P is on GFS side
Prevayler/Madeleine      Consistency       Availability    Partition tolerance
NewSQL  Consistency    AvailabilityPartition toleranceImpossible according to the theory  ...but Stonebraker doesnt agree
Real life stories
What you think you have
What you really have
..to be fair
The art of choiceScalability over ConsistencyConsistency over Scalability
Forfeit Partition ToleranceConsistent system - easyHigh Availability - hardknown & proven HA workaroundsFacebook - MySQL +...
Forfeit ConsistencyHigh AvailabilityHorizontal scalability - better"Eventually consistent" (BASE)HA = race conditionsworka...
What you needExtremely efficientReliable (in data sense)
ACIDAtomicityConsistencyIsolationDurability
BASEBasically AvailableSoft stateEventual consistency
ACIDpeople dont care...but think data is consistent anywayyou cant enforce consistency atActiveRecord level
BASEconsistency relaxedto make horizontal scalability easierinconsistencies handled by developer
beware of vendorsthey dont always tell the truthNoSQL is never ACID-compilantNoSQL - lack of atomic operationsacross docum...
SQL is ACIDexcept MySQL with MyISAMMVCC over lockingbut must follow the rulesforeign keys, unique indexestransaction isola...
LinksCAP presoCAP proofCAP explainedCAP and NoSQLComparisionStonbraker on CAPSharding limitsmore on CAP
Questions?
Upcoming SlideShare
Loading in …5
×

Cap Theorem

1,412 views

Published on

Published in: Technology, Spiritual
  • Be the first to comment

Cap Theorem

  1. 1. CAP Theorem The art of choice @mlomnicki
  2. 2. CAP Theorem by Eric Brewer in 2000Proven in 2002 by Seth Gilbert & Nancy Linch
  3. 3. CAP Theorem Consistency Availability Partition toleranceAt most 2 of 3 properties may be satisfied
  4. 4. CAP Theorem
  5. 5. RDBMS (single-site and cluster) Consistency Availability Partition tolerance
  6. 6. Distributed RDBMS Consistency Availability Partition tolerance
  7. 7. NoSQL Consistency AvailabilityPartition tolerance ...also DNS is AP
  8. 8. BigTable Consistency AvailabilityPartition tolerance P is on GFS side
  9. 9. Prevayler/Madeleine Consistency Availability Partition tolerance
  10. 10. NewSQL Consistency AvailabilityPartition toleranceImpossible according to the theory ...but Stonebraker doesnt agree
  11. 11. Real life stories
  12. 12. What you think you have
  13. 13. What you really have
  14. 14. ..to be fair
  15. 15. The art of choiceScalability over ConsistencyConsistency over Scalability
  16. 16. Forfeit Partition ToleranceConsistent system - easyHigh Availability - hardknown & proven HA workaroundsFacebook - MySQL + memcacheVertical scalability
  17. 17. Forfeit ConsistencyHigh AvailabilityHorizontal scalability - better"Eventually consistent" (BASE)HA = race conditionsworkarounds?
  18. 18. What you needExtremely efficientReliable (in data sense)
  19. 19. ACIDAtomicityConsistencyIsolationDurability
  20. 20. BASEBasically AvailableSoft stateEventual consistency
  21. 21. ACIDpeople dont care...but think data is consistent anywayyou cant enforce consistency atActiveRecord level
  22. 22. BASEconsistency relaxedto make horizontal scalability easierinconsistencies handled by developer
  23. 23. beware of vendorsthey dont always tell the truthNoSQL is never ACID-compilantNoSQL - lack of atomic operationsacross documents/collectionsPrevayler - poor isolationHBase - poor durability
  24. 24. SQL is ACIDexcept MySQL with MyISAMMVCC over lockingbut must follow the rulesforeign keys, unique indexestransaction isolation levels
  25. 25. LinksCAP presoCAP proofCAP explainedCAP and NoSQLComparisionStonbraker on CAPSharding limitsmore on CAP
  26. 26. Questions?

×