Cap Theorem
Upcoming SlideShare
Loading in...5
×
 

Cap Theorem

on

  • 1,184 views

 

Statistics

Views

Total Views
1,184
Views on SlideShare
1,184
Embed Views
0

Actions

Likes
1
Downloads
15
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Cap Theorem Cap Theorem Presentation Transcript

  • 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 be satisfied
  • 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 + memcacheVertical scalability
  • Forfeit ConsistencyHigh AvailabilityHorizontal scalability - better"Eventually consistent" (BASE)HA = race conditionsworkarounds?
  • 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 documents/collectionsPrevayler - poor isolationHBase - poor durability
  • SQL is ACIDexcept MySQL with MyISAMMVCC over lockingbut must follow the rulesforeign keys, unique indexestransaction isolation levels
  • LinksCAP presoCAP proofCAP explainedCAP and NoSQLComparisionStonbraker on CAPSharding limitsmore on CAP
  • Questions?