Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
43
Other Decks in Technology
See All in Technology
障害対応訓練、その前に
coconala_engineer
0
150
Entity Framework Core におけるIN句クエリ最適化について
htkym
0
110
半年で、AIゼロ知識から AI中心開発組織の変革担当に至るまで
rfdnxbro
0
120
New Relic 1 年生の振り返りと Cloud Cost Intelligence について #NRUG
play_inc
0
180
Strands Agents × インタリーブ思考 で変わるAIエージェント設計 / Strands Agents x Interleaved Thinking AI Agents
takanorig
4
1.7k
Strands AgentsとNova 2 SonicでS2Sを実践してみた
yama3133
1
1.5k
ペアーズにおけるAIエージェント 基盤とText to SQLツールの紹介
hisamouna
2
1.3k
フィッシュボウルのやり方 / How to do a fishbowl
pauli
2
350
日本Rubyの会: これまでとこれから
snoozer05
PRO
5
220
100以上の新規コネクタ提供を可能にしたアーキテクチャ
ooyukioo
0
220
2025-12-18_AI駆動開発推進プロジェクト運営について / AIDD-Promotion project management
yayoi_dd
0
150
たまに起きる外部サービスの障害に備えたり備えなかったりする話
egmc
0
360
Featured
See All Featured
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
38
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
63
End of SEO as We Know It (SMX Advanced Version)
ipullrank
2
3.8k
Code Review Best Practice
trishagee
74
19k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
580
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
Discover your Explorer Soul
emna__ayadi
2
1k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
14
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
0
60
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
31
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
0
180
Building an army of robots
kneath
306
46k
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?