SlideShare ist ein Scribd-Unternehmen logo
1 von 71
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Mehr von Wilfred Springer

Mehr von 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)
 

Kürzlich hochgeladen

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Kürzlich hochgeladen (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

NoSQL Rollercoaster