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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
67
[PL] Transakcje w bazach danych
mlomnicki
1
270
Ruby Tricks 2
mlomnicki
3
73
SchemaPlus
mlomnicki
1
45
Other Decks in Technology
See All in Technology
事例に見るスマートファクトリーへの道筋〜工場データをAI Readyにする実践ステップ〜
hamadakoji
1
310
オレ達はAWS管理をやりたいんじゃない!開発の生産性を爆アゲしたいんだ!!
wkm2
4
510
社内レビューは機能しているのか
matsuba
0
120
内製AIチャットボットで学んだDatadog LLM Observability活用術
mkdev10
0
100
Claude Codeが爆速進化してプラグイン追従がつらいので半自動化した話 ver.2
rfdnxbro
0
530
AIエージェント時代に備える AWS Organizations とアカウント設計
kossykinto
3
920
AWS DevOps Agent vs SRE俺 / AWS DevOps Agent vs me, the SRE
sms_tech
3
660
楽しく学ぼう!ネットワーク入門
shotashiratori
4
3.2k
ナレッジワーク IT情報系キャリア研究セッション資料(情報処理学会 第88回全国大会 )
kworkdev
PRO
0
190
OSC仙台プレ勉強会 AlmaLinuxとは
koedoyoshida
0
150
Scrumは歪む — 組織設計の原理原則
dashi
0
160
アーキテクチャモダナイゼーションを実現する組織
satohjohn
1
690
Featured
See All Featured
Making Projects Easy
brettharned
120
6.6k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
440
Designing for humans not robots
tammielis
254
26k
HDC tutorial
michielstock
1
540
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
710
We Are The Robots
honzajavorek
0
200
Utilizing Notion as your number one productivity tool
mfonobong
4
260
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
210
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
390
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.4k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
130
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?