Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CAP Theorem
Search
Michał Łomnicki
November 21, 2012
Technology
2
130
CAP Theorem
Michał Łomnicki
November 21, 2012
Tweet
Share
More Decks by Michał Łomnicki
See All by Michał Łomnicki
DDD, Rails and persistence
mlomnicki
1
280
Forget Ruby. Forget CoffeeScript. Do SOA
mlomnicki
1
130
Having fun with legacy apps
mlomnicki
1
66
[PL] Transakcje w bazach danych
mlomnicki
1
250
Ruby Tricks 2
mlomnicki
3
70
SchemaPlus
mlomnicki
1
44
Other Decks in Technology
See All in Technology
コールドスタンバイ構成でCDは可能か
hiramax
0
130
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.5k
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
Introduction to Sansan Meishi Maker Development Engineer
sansan33
PRO
0
330
Digitization部 紹介資料
sansan33
PRO
1
6.5k
【Agentforce Hackathon Tokyo 2025 発表資料】みらいシフト:あなた働き方を、みらいへシフト。
kuratani
0
110
AIエージェントを5分で一気におさらい!AIエージェント「構築」元年に備えよう
yakumo
1
150
Cloud WAN MCP Serverから考える新しいネットワーク運用 / 20251228 Masaki Okuda
shift_evolve
PRO
0
150
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
2.9k
困ったCSVファイルの話
mottyzzz
0
170
AI との良い付き合い方を僕らは誰も知らない (WSS 2026 静岡版)
asei
1
300
CQRS/ESになぜアクターモデルが必要なのか
j5ik2o
0
910
Featured
See All Featured
Test your architecture with Archunit
thirion
1
2.1k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
370
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
1
350
Building Adaptive Systems
keathley
44
2.9k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.1k
Why Our Code Smells
bkeepers
PRO
340
58k
Are puppies a ranking factor?
jonoalderson
0
2.6k
Agile that works and the tools we love
rasmusluckow
331
21k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
210
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
58
41k
The Pragmatic Product Professional
lauravandoore
37
7.1k
What the history of the web can teach us about the future of AI
inesmontani
PRO
0
390
Transcript
CAP Theorem The art of choice @mlomnicki
CAP Theorem by Eric Brewer in 2000 Proven in 2002
by Seth Gilbert & Nancy Linch
CAP Theorem Consistency Availability Partition tolerance At 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 Availability Partition tolerance ...also DNS is AP
BigTable Consistency Availability Partition tolerance P is on GFS side
Prevayler/Madeleine Consistency Availability Partition tolerance
NewSQL Consistency Availability Partition tolerance Impossible according to the theory
...but Stonebraker doesn't agree
Real life stories
What you think you have
What you really have
..to be fair
The art of choice Scalability over Consistency Consistency over Scalability
Forfeit Partition Tolerance Consistent system - easy High Availability -
hard known & proven HA workarounds Facebook - MySQL + memcache Vertical scalability
Forfeit Consistency High Availability Horizontal scalability - better "Eventually consistent"
(BASE) HA = race conditions workarounds?
What you need Extremely efficient Reliable (in data sense)
ACID Atomicity Consistency Isolation Durability
BASE Basically Available Soft state Eventual consistency
ACID people don't care ...but think data is consistent anyway
you can't enforce consistency at ActiveRecord level
BASE consistency relaxed to make horizontal scalability easier inconsistencies handled
by developer
beware of vendors they don't always tell the truth NoSQL
is never ACID-compilant NoSQL - lack of atomic operations across documents/collections Prevayler - poor isolation HBase - poor durability
SQL is ACID except MySQL with MyISAM MVCC over locking
but must follow the rules foreign keys, unique indexes transaction isolation levels
Links CAP preso CAP proof CAP explained CAP and NoSQL
Comparision Stonbraker on CAP Sharding limits more on CAP
Questions?