SlideShare une entreprise Scribd logo
1  sur  71
Télécharger pour lire hors ligne
A NoSQL Rollercoaster
Saturday, November 6, 2010
Saturday, November 6, 2010
IMS
The Hierarchical
Database
(1966)
Vern Watts
Saturday, November 6, 2010
“A Relational
Model for Large
Shared
Databanks”
(1970)
Ted Codd
Saturday, November 6, 2010
“"SEQUEL: A
Structured
English Query
Language"
Don Chamberlin & Ray
Boyce
(1974)
Don Chamberlin
Saturday, November 6, 2010
ACID
(late 1970’s)
Jim Gray
Saturday, November 6, 2010
“NoSQL”
coined
(1998)
Carlo Strozzi
Saturday, November 6, 2010
“NoSQL” Reintroduced
(2008)
Eric Evans
Saturday, November 6, 2010
select fun, profit from
real_world where
relational=false?
Saturday, November 6, 2010
“In striving to make every
user happy, a technology an
actually leave the majority
unhappy.”
“Every good idea is
generalized to its level of
inapplicability.”
(Peter Principle)
Saturday, November 6, 2010
Saturday, November 6, 2010
Why?
Saturday, November 6, 2010
Internet Scale
• Massive data
collections
• Huge number of
requests
• Coming from
geographic areas
across the globe
• 24/7
Saturday, November 6, 2010
Total Cost of Ownership
• The price of a license
• The price of support
• The price of hardware
Saturday, November 6, 2010
Availability
Saturday, November 6, 2010
Data Models
Saturday, November 6, 2010
Column Oriented
…
key
named
column
named
column
named
column
named
column
named
column
Column Family ≈ Table
Empty cells are
cheap (sparse
table)
Can grow “indefinitely”
Schemaless
No
secundary
indexes
Saturday, November 6, 2010
Column Oriented + Super Columns
…
key
named
column
named
column
named
column
named
column
named
column
…
named
column
named
column
named
column
…
Super Columns
Saturday, November 6, 2010
Key Value Store
•Schemaless
•Versioning
1011
0110
Saturday, November 6, 2010
Graph Database
SPARQL?
Saturday, November 6, 2010
Document Store
Improved
Indexing
<persons>
<person>
<name>Wilfred</name>
<surname>Springer
</person>
…
</persons>
[{ "Name" :
"Wilfred",
"Surname" :
"Springer"},
…
]
JSON
XML
Serverside
Processing
Saturday, November 6, 2010
Challenges
Saturday, November 6, 2010
CAP
Theorem
Eric Brewer
Saturday, November 6, 2010
Availability Consistency
Partition
Tolerance
Pick two
Saturday, November 6, 2010
Consistency
Consistency
Strong
Consistency
Weak
Consistency
Eventual
Consistency
Other
Causal
Consistency
Read-your-
writes
Consistency
Session
Consistency
Monotonic Read
Consistency
Monotonic Write
Consistency
Saturday, November 6, 2010
Strong Consistency
A
B
C
1
2
2
2
0 value = "foo"
value = "bar"
value = "bar"
value = "bar"
value = "bar"
After the update, any subsequent access will return the
updated value.
Saturday, November 6, 2010
Weak Consistency
A
B
C
1 value = "bar"
value = "bar" /
"foo"
value = "bar" / "foo"
value = "bar" / "foo"
0 value = "foo"
>1
>1
>1
The system does not guarantee that at any given point in
the future subsequent access will return the updated
value
Saturday, November 6, 2010
Eventual Consistency
If no updates are made to the object, eventually all
accesses will return the last updated value.
A
B
C
1 value = "bar"
value = "bar"
value = "bar"
value = "bar"
0 value = "foo"
t
t
t
t ≥ 1
Saturday, November 6, 2010
Session Consistency
Within the “session”, the system guarantees read-your-
writes consistency
2 value = "foo"
Session 1
Session 2
A
B
C
1 value = "bar"
0 value = "foo"
2 value = "bar"
Saturday, November 6, 2010
Partition Tolerance
A
writes new value
replicates
new value
reads new
value
Saturday, November 6, 2010
Partition Tolerance
A
writes new value
replicates
new value
reads new
value
!
Saturday, November 6, 2010
Partition Tolerance
A
writes new value
fails to
replicate
new value
reads old
value
Saturday, November 6, 2010
Partition Tolerance
A
failing attempt
to write a new
value
fails to
replicate
new value
Saturday, November 6, 2010
Byzantine Failures
Saturday, November 6, 2010
Faults that might
occur in a
distributed
system
•Lying
•Fabrication of messages
•Collisions
•Selective non-participation
Saturday, November 6, 2010
Byzantine
Generals
Problem
Saturday, November 6, 2010
Solution
Strategies
Saturday, November 6, 2010
Strong
Consistency
1
Saturday, November 6, 2010
Παξοί
Saturday, November 6, 2010
Leader Proposer
Acceptor Learner
Four Roles
Saturday, November 6, 2010
Paxos in a Nutshell
Request
Propose
Promise
Accept
Accepted
Response
Saturday, November 6, 2010
Processors
combine
various
roles
Consensus
based on
majority vote
Paxos guarantees
progress for 2F + 1
processors in face of
failure of F processors
Saturday, November 6, 2010
“Either Paxos,
Paxos with
cruft, or
broken”
Mike Burrows
(Google Chubby)
Saturday, November 6, 2010
Partitioning
2
Saturday, November 6, 2010
Consistent Hashing
Key K
A
B
C
D
E
F
G
H
Saturday, November 6, 2010
High
Availability
3
Saturday, November 6, 2010
Replication
A
B
C
D
E
F
G
H
Saturday, November 6, 2010
W = 3
N = 4
R = 2
A
Replication Factor
Saturday, November 6, 2010
W = 3
N = 4
R = 2
A
Reconciliation during reads
Reconciliation
Saturday, November 6, 2010
Handling
Temporary
Failures
4
Saturday, November 6, 2010
Problem
Reconcilation
?
Alice Ben CathyDave
Wednesday?
Thursday
Tuesday
What's it gonna be?
Tuesday ThursdayX
? ? ?
Saturday, November 6, 2010
Vector Clocks
date = Wednesday
vclock = Alice:1
date = Tuesday
vclock = Alice:1, Ben:1
date = Tuesday
vclock = Alice:1, Ben:1, Dave:1
date = Tuesday
vclock = Alice:1, Cathy:1
date = Thursday
vclock = Alice:1, Ben:1, Cathy:1, Dave:2
Saturday, November 6, 2010
Conflict Resolution
date = Tuesday
vclock = Alice:1, Ben:1, Dave:1
date = Thursday
vclock = Alice:1, Ben:1, Cathy:1, Dave:2
6
Saturday, November 6, 2010
Recovering from
permanent
failures
5
Saturday, November 6, 2010
What if nodes die permantly?
A
B
C
D
E
F
G
H
Saturday, November 6, 2010
Merkle Trees
#
#
#
#
#
#
#
#
#
#
#
#
#
#
Saturday, November 6, 2010
Enough is enough!!!
Saturday, November 6, 2010
Conclusions
Saturday, November 6, 2010
Conclusions
Scale!!!
Saturday, November 6, 2010
Conclusions
Scale!!!
No free ride
Saturday, November 6, 2010
Conclusions
Scale!!!
No free ride
You gain some
Saturday, November 6, 2010
Conclusions
Scale!!!
No free ride
You gain some
You lose some
Saturday, November 6, 2010
Conclusions
Scale!!!
No free ride
You gain some
You lose some
Choice
Saturday, November 6, 2010
Conclusions
Scale!!!
No free ride
You gain some
You lose some
Choice
Control
Saturday, November 6, 2010
Conclusions
Scale!!!
No free ride
You gain some
You lose some
Choice
Control
Take control
Saturday, November 6, 2010
Conclusions
Scale!!!
No free ride
You gain some
You lose some
Choice
Control
Take control
Understand your options
Saturday, November 6, 2010
Conclusions
Scale!!!
No free ride
You gain some
You lose some
Choice
Control
Take control
Understand your options
Fun!!!
Saturday, November 6, 2010
Conclusions
Scale!!!
No free ride
You gain some
You lose some
Choice
Control
Take control
Understand your options
Fun!!!
Changes your way of thinking
Saturday, November 6, 2010
Conclusions
Scale!!!
No free ride
You gain some
You lose some
Choice
Control
Take control
Understand your options
Fun!!!
Changes your way of thinking
Saturday, November 6, 2010
No SQL!!!
wilfredspringer@gmail.com
Saturday, November 6, 2010
BASE
• Basically Available
• Soft State
• Eventually Consistent
Saturday, November 6, 2010

Contenu connexe

Plus de Wilfred Springer (9)

Unfiltered Unveiled
Unfiltered UnveiledUnfiltered Unveiled
Unfiltered Unveiled
 
Scala in your organisation
Scala in your organisationScala in your organisation
Scala in your organisation
 
Unfiltered Unveiled
Unfiltered UnveiledUnfiltered Unveiled
Unfiltered Unveiled
 
NoSQL
NoSQLNoSQL
NoSQL
 
Byzantine Generals
Byzantine GeneralsByzantine Generals
Byzantine Generals
 
Eventually Consistent
Eventually ConsistentEventually Consistent
Eventually Consistent
 
Into the Wild
Into the WildInto the Wild
Into the Wild
 
OOPSLA Talk on Preon
OOPSLA Talk on PreonOOPSLA Talk on Preon
OOPSLA Talk on Preon
 
Preon (J-Fall 2008)
Preon (J-Fall 2008)Preon (J-Fall 2008)
Preon (J-Fall 2008)
 

Dernier

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 

Dernier (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 

NoSQL Rollercoaster