SlideShare una empresa de Scribd logo
1 de 71
Descargar para leer sin conexión
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

Más contenido relacionado

Más 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)
 

Último

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
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
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
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
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
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 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
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
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
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
 
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
 

Último (20)

Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
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
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
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
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
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
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
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
 
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...
 

NoSQL Rollercoaster