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
140
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
CAP Theorem
Michał Łomnicki
November 21, 2012
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
77
[PL] Transakcje w bazach danych
mlomnicki
1
290
Ruby Tricks 2
mlomnicki
3
79
SchemaPlus
mlomnicki
1
49
Other Decks in Technology
See All in Technology
Keeping applications secure by evolving OAuth 2.0 and OpenID Connect
ahus1
PRO
1
150
ZOZOTOWNの進化と信頼性を両立する負荷試験
zozotech
PRO
1
150
スタートアップにおけるアジャイルの実践について #shibuyagile
murabayashi
3
2.1k
キャリアの中で本を作る / Making a Book During Your Career
ak1210
0
130
Amazon EVS で VCF 9.0 / 9.1 のサポート開始まとめ
mtoyoda
0
280
Claude Codeとハーネスについて考えてみる
oikon48
18
9k
Mastraエージェント、どのクラウドにデプロイする?
minorun365
PRO
2
180
Docker Desktop不要の時代が来る? WSL標準の「wslc」で Linuxコンテナを動かしてみた.
ueponx
0
860
はじめてのWDM
miyukichi_ospf
1
140
事業価値を⽣み出すSREへ SREが担うべき意思決定の5層
kenta_hi
2
3k
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
15
110k
知らん間に、回ってる
ming_ayami
0
380
Featured
See All Featured
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
890
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.2k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
Accessibility Awareness
sabderemane
1
150
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The Cost Of JavaScript in 2023
addyosmani
55
10k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Skip the Path - Find Your Career Trail
mkilby
1
160
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?