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
110
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
250
Forget Ruby. Forget CoffeeScript. Do SOA
mlomnicki
1
120
Having fun with legacy apps
mlomnicki
1
58
[PL] Transakcje w bazach danych
mlomnicki
1
110
Ruby Tricks 2
mlomnicki
3
53
SchemaPlus
mlomnicki
1
37
Other Decks in Technology
See All in Technology
リテール金融(キャッシュレス・ネット銀行・ネット証券)の競争環境と経済圏
8maki
0
1.8k
Secrets of a PowerShell "Guru"
guyrleech
1
110
今日からできる!簡単 .NET 高速化 Tips -2024 edition-
xin9le
7
4.9k
競技としてのKaggle、役に立つKaggle
yu4u
7
2.5k
LayerXにおけるLLMプロダクト開発の今までとこれから
layerx
PRO
4
1.5k
エンジニア候補者向け資料2024.04.24.pdf
macloud
0
3.4k
IaCジェネレーターとBedrockで詳細設計書を生成してみた
tsukasa_ishimaru
4
950
Rustで「プリズモイダル法」を利用して「土量計算」をガチでやる
nokonoko1203
1
360
Gitlab本から学んだこと - そーだいなるプレイバック / gitlab-book
soudai
7
1.4k
ルーターでプレゼンする
puhitaku
1
3.4k
M&A戦略を支えるデータマネジメント (MIDAS Tech Study #16 GENDA Komiyama)
kommy339
1
170
データベース03: 関係データモデル
trycycle
0
110
Featured
See All Featured
Designing on Purpose - Digital PM Summit 2013
jponch
111
6.5k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
21
1.6k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
126
32k
Music & Morning Musume
bryan
41
5.6k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
221
21k
A Modern Web Designer's Workflow
chriscoyier
689
190k
Building Applications with DynamoDB
mza
88
5.6k
Fashionably flexible responsive web design (full day workshop)
malarkey
398
65k
GraphQLとの向き合い方2022年版
quramy
33
12k
The Illustrated Children's Guide to Kubernetes
chrisshort
32
47k
Bootstrapping a Software Product
garrettdimon
PRO
302
110k
Writing Fast Ruby
sferik
622
60k
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?