SlideShare une entreprise Scribd logo
1  sur  15
Télécharger pour lire hors ligne
The Consistency vs
Throughput Tradeoff in
Distributed Databases
Daniel Abadi, Darnell-Kanal Professor
Introduction
Distributed database systems:
■ CAP theorem: you must trade availability for consistency
■ PACELC theorem: you must trade latency for consistency
■ But do you have to trade throughput for consistency???
Background
Widget ID Price In_Stock
1 99 4
2 325 12
3 79 1
4 199 7
Customer
id
Store_
Credit
1 0
2 100
3 50
4 0
5 10
6 500
7 0
8 25
Customer 2 buys widget 3 with
store credit:
W = Widgets.READ(3)
C = Customers.READ(2)
IF (W.In_Stock < 1)
ABORT
IF (C.Store_Credit < W.price)
ABORT
W.In_Stock -= 1
C.Store_Credit -= W.price
Background
Widget ID Price In_Stock
1 99 4
2 325 12
3 79 0
4 199 7
Customer
id
Store_
Credit
1 0
2 100
3 50
4 0
5 10
6 500
7 0
8 25
Customer 2 buys widget 3 with
store credit:
W = Widgets.READ(3)
C = Customers.READ(2)
IF (W.In_Stock < 1)
ABORT
IF (C.Store_Credit < W.price)
ABORT
W.In_Stock -= 1
C.Store_Credit -= W.price
Background
Widget ID Price In_Stock
1 99 4
2 325 12
3 79 0
4 199 7
Customer
id
Store_
Credit
1 0
2 21
3 50
4 0
5 10
6 500
7 0
8 25
Customer 2 buys widget 3 with
store credit:
W = Widgets.READ(3)
C = Customers.READ(2)
IF (W.In_Stock < 1)
ABORT
IF (C.Store_Credit < W.price)
ABORT
W.In_Stock -= 1
C.Store_Credit -= W.price
Distributed databases are hard
Widget ID Price In_Stock
1 99 4
Customer id Store_ Credit
1 0
5 10
Widget ID Price In_Stock
2 325 12
Customer id Store_ Credit
2 100
6 500
Widget ID Price In_Stock
3 79 1
Customer id Store_ Credit
3 50
7 0
Widget ID Price In_Stock
4 199 7
Customer id Store_ Credit
4 0
8 25
Distributed databases are hard
Widget ID Price In_Stock
2 325 12
Customer id Store_ Credit
2 100
6 500
Widget ID Price In_Stock
3 79 1
Customer id Store_ Credit
3 50
7 0
Customer 2 buys widget 3 with store credit:
W = Widgets.READ(3)
C = Customers.READ(2)
IF (W.In_Stock < 1)
ABORT
IF (C.Store_Credit < W.price)
ABORT
W.In_Stock -= 1
C.Store_Credit -= W.price
W.price = 79
Customer id Store_ Credit
2 21
6 500
Widget ID Price In_Stock
3 79 0
Distributed databases are hard
Widget ID Price In_Stock
2 325 12
Customer id Store_ Credit
3 50
7 0
prepare
r
e
a
d
y
c
o
m
m
i
t
d
o
n
e
No conflicting transactions can run!
W.price = 79
Customer 2 buys widget 3 with store credit:
W = Widgets.READ(3)
C = Customers.READ(2)
IF (W.In_Stock < 1)
ABORT
IF (C.Store_Credit < W.price)
ABORT
W.In_Stock -= 1
C.Store_Credit -= W.price
Replication exacerbates the problem
Widget ID Price In_Stock
2 325 12
Customer id Store_ Credit
2 21
6 500
Widget ID Price In_Stock
3 79 0
Customer id Store_ Credit
3 50
7 0
Widget ID Price In_Stock
2 325 12
Customer id Store_ Credit
2 100
6 500
Widget ID Price In_Stock
3 79 1
Customer id Store_ Credit
3 50
7 0
replicate
replicate
Replication exacerbates the problem
Widget ID Price In_Stock
2 325 12
Customer id Store_ Credit
2 21
6 500
Widget ID Price In_Stock
3 79 0
Customer id Store_ Credit
3 50
7 0
Widget ID Price In_Stock
2 325 12
Customer id Store_ Credit
2 100
6 500
Widget ID Price In_Stock
3 79 1
Customer id Store_ Credit
3 50
7 0
replicate
replicate
Replication exacerbates the problem
Widget ID Price In_Stock
2 325 12
Customer id Store_ Credit
2 21
6 500
Widget ID Price In_Stock
3 79 0
Customer id Store_ Credit
3 50
7 0
Widget ID Price In_Stock
2 325 12
Customer id Store_ Credit
2 21
6 500
Widget ID Price In_Stock
3 79 0
Customer id Store_ Credit
3 50
7 0
done
done
No conflicting transactions can run!
replicate
replicate
■ Commit protocol like 2PC
■ Needed for A, C, and D of ACID
■ BUT:
■ Latency of protocol
■ Throughput reduction
■ Synchronous replication
■ Needed for C of CAP
■ BUT:
■ Latency of replication
■ Throughput reduction
Summary of performance issues
■ If we have to trade throughout for consistency, it should
be PACETLC, not PACELC!
■ But is the throughput tradeoff fundamental?
PACETLC?
■ All throughput problems are caused by preventing conflicting
transactions from running. Therefore:
■ If we don’t guarantee strong isolation, the problem goes away
■ If there are no conflicting transactions, the problem never exists in
the first place
■ Deterministic systems eliminate the throughput tradeoff entirely
■ But that’s a whole other talk!
Throughput tradeoff is not fundamental!
Thank You
Stay in Touch
Daniel Abadi
abadi@umd.edu
@daniel_abadi
www.linkedin.com/in/databaseprof

Contenu connexe

Similaire à The Consistency vs Throughput Tradeoff in Distributed Databases

3DConsulting_Presentation
3DConsulting_Presentation3DConsulting_Presentation
3DConsulting_Presentation
Joseph Baca
 
Warranty management system
Warranty management systemWarranty management system
Warranty management system
Moin Raza Khan
 
Database Development Replication Security Maintenance Report
Database Development Replication Security Maintenance ReportDatabase Development Replication Security Maintenance Report
Database Development Replication Security Maintenance Report
nyin27
 

Similaire à The Consistency vs Throughput Tradeoff in Distributed Databases (20)

3DConsulting_Presentation
3DConsulting_Presentation3DConsulting_Presentation
3DConsulting_Presentation
 
Developing Microsoft SQL Server 2012 Databases 70-464 Pass Guarantee
Developing Microsoft SQL Server 2012 Databases 70-464 Pass GuaranteeDeveloping Microsoft SQL Server 2012 Databases 70-464 Pass Guarantee
Developing Microsoft SQL Server 2012 Databases 70-464 Pass Guarantee
 
Medium Questions
Medium QuestionsMedium Questions
Medium Questions
 
Microsoft MCSE 70-469 it braindumps
Microsoft MCSE 70-469 it braindumpsMicrosoft MCSE 70-469 it braindumps
Microsoft MCSE 70-469 it braindumps
 
Sql Portfolio
Sql PortfolioSql Portfolio
Sql Portfolio
 
Warranty management system
Warranty management systemWarranty management system
Warranty management system
 
Assignment#06
Assignment#06Assignment#06
Assignment#06
 
1Z0-061 Oracle Database 12c: SQL Fundamentals
1Z0-061 Oracle Database 12c: SQL Fundamentals1Z0-061 Oracle Database 12c: SQL Fundamentals
1Z0-061 Oracle Database 12c: SQL Fundamentals
 
Higher isdd revision presentation
Higher isdd revision presentationHigher isdd revision presentation
Higher isdd revision presentation
 
Sangam 19 - PLSQL still the coolest
Sangam 19 - PLSQL still the coolestSangam 19 - PLSQL still the coolest
Sangam 19 - PLSQL still the coolest
 
PostgreSQL Portland Performance Practice Project - Database Test 2 Workload D...
PostgreSQL Portland Performance Practice Project - Database Test 2 Workload D...PostgreSQL Portland Performance Practice Project - Database Test 2 Workload D...
PostgreSQL Portland Performance Practice Project - Database Test 2 Workload D...
 
JavaOne 2015 CON5211 Digital Java EE 7 with JSF Conversations, Flows, and CDI...
JavaOne 2015 CON5211 Digital Java EE 7 with JSF Conversations, Flows, and CDI...JavaOne 2015 CON5211 Digital Java EE 7 with JSF Conversations, Flows, and CDI...
JavaOne 2015 CON5211 Digital Java EE 7 with JSF Conversations, Flows, and CDI...
 
Reporte produccion
Reporte produccionReporte produccion
Reporte produccion
 
Database Development Replication Security Maintenance Report
Database Development Replication Security Maintenance ReportDatabase Development Replication Security Maintenance Report
Database Development Replication Security Maintenance Report
 
Dbms assignment 2
Dbms assignment 2Dbms assignment 2
Dbms assignment 2
 
MySQL under the siege
MySQL under the siegeMySQL under the siege
MySQL under the siege
 
Powering Consistent, High-throughput, Real-time Distributed Calculation Engin...
Powering Consistent, High-throughput, Real-time Distributed Calculation Engin...Powering Consistent, High-throughput, Real-time Distributed Calculation Engin...
Powering Consistent, High-throughput, Real-time Distributed Calculation Engin...
 
Kafka Streams State Stores Being Persistent
Kafka Streams State Stores Being PersistentKafka Streams State Stores Being Persistent
Kafka Streams State Stores Being Persistent
 
QSDA2022: Qlik Sense Data Architect | Q & A
QSDA2022: Qlik Sense Data Architect | Q & AQSDA2022: Qlik Sense Data Architect | Q & A
QSDA2022: Qlik Sense Data Architect | Q & A
 
CBI D-DA3CA1-ND1ZXBL-CS2000X-1
CBI D-DA3CA1-ND1ZXBL-CS2000X-1CBI D-DA3CA1-ND1ZXBL-CS2000X-1
CBI D-DA3CA1-ND1ZXBL-CS2000X-1
 

Plus de ScyllaDB

Plus de ScyllaDB (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
What Developers Need to Unlearn for High Performance NoSQL
What Developers Need to Unlearn for High Performance NoSQLWhat Developers Need to Unlearn for High Performance NoSQL
What Developers Need to Unlearn for High Performance NoSQL
 
Low Latency at Extreme Scale: Proven Practices & Pitfalls
Low Latency at Extreme Scale: Proven Practices & PitfallsLow Latency at Extreme Scale: Proven Practices & Pitfalls
Low Latency at Extreme Scale: Proven Practices & Pitfalls
 
Dissecting Real-World Database Performance Dilemmas
Dissecting Real-World Database Performance DilemmasDissecting Real-World Database Performance Dilemmas
Dissecting Real-World Database Performance Dilemmas
 
Beyond Linear Scaling: A New Path for Performance with ScyllaDB
Beyond Linear Scaling: A New Path for Performance with ScyllaDBBeyond Linear Scaling: A New Path for Performance with ScyllaDB
Beyond Linear Scaling: A New Path for Performance with ScyllaDB
 
Dissecting Real-World Database Performance Dilemmas
Dissecting Real-World Database Performance DilemmasDissecting Real-World Database Performance Dilemmas
Dissecting Real-World Database Performance Dilemmas
 
Database Performance at Scale Masterclass: Workload Characteristics by Felipe...
Database Performance at Scale Masterclass: Workload Characteristics by Felipe...Database Performance at Scale Masterclass: Workload Characteristics by Felipe...
Database Performance at Scale Masterclass: Workload Characteristics by Felipe...
 
Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...
Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...
Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...
 
Database Performance at Scale Masterclass: Driver Strategies by Piotr Sarna
Database Performance at Scale Masterclass: Driver Strategies by Piotr SarnaDatabase Performance at Scale Masterclass: Driver Strategies by Piotr Sarna
Database Performance at Scale Masterclass: Driver Strategies by Piotr Sarna
 
Replacing Your Cache with ScyllaDB
Replacing Your Cache with ScyllaDBReplacing Your Cache with ScyllaDB
Replacing Your Cache with ScyllaDB
 
Powering Real-Time Apps with ScyllaDB_ Low Latency & Linear Scalability
Powering Real-Time Apps with ScyllaDB_ Low Latency & Linear ScalabilityPowering Real-Time Apps with ScyllaDB_ Low Latency & Linear Scalability
Powering Real-Time Apps with ScyllaDB_ Low Latency & Linear Scalability
 
7 Reasons Not to Put an External Cache in Front of Your Database.pptx
7 Reasons Not to Put an External Cache in Front of Your Database.pptx7 Reasons Not to Put an External Cache in Front of Your Database.pptx
7 Reasons Not to Put an External Cache in Front of Your Database.pptx
 
Getting the most out of ScyllaDB
Getting the most out of ScyllaDBGetting the most out of ScyllaDB
Getting the most out of ScyllaDB
 
NoSQL Database Migration Masterclass - Session 2: The Anatomy of a Migration
NoSQL Database Migration Masterclass - Session 2: The Anatomy of a MigrationNoSQL Database Migration Masterclass - Session 2: The Anatomy of a Migration
NoSQL Database Migration Masterclass - Session 2: The Anatomy of a Migration
 
NoSQL Database Migration Masterclass - Session 3: Migration Logistics
NoSQL Database Migration Masterclass - Session 3: Migration LogisticsNoSQL Database Migration Masterclass - Session 3: Migration Logistics
NoSQL Database Migration Masterclass - Session 3: Migration Logistics
 
NoSQL Data Migration Masterclass - Session 1 Migration Strategies and Challenges
NoSQL Data Migration Masterclass - Session 1 Migration Strategies and ChallengesNoSQL Data Migration Masterclass - Session 1 Migration Strategies and Challenges
NoSQL Data Migration Masterclass - Session 1 Migration Strategies and Challenges
 
ScyllaDB Virtual Workshop
ScyllaDB Virtual WorkshopScyllaDB Virtual Workshop
ScyllaDB Virtual Workshop
 
DBaaS in the Real World: Risks, Rewards & Tradeoffs
DBaaS in the Real World: Risks, Rewards & TradeoffsDBaaS in the Real World: Risks, Rewards & Tradeoffs
DBaaS in the Real World: Risks, Rewards & Tradeoffs
 
Build Low-Latency Applications in Rust on ScyllaDB
Build Low-Latency Applications in Rust on ScyllaDBBuild Low-Latency Applications in Rust on ScyllaDB
Build Low-Latency Applications in Rust on ScyllaDB
 
NoSQL Data Modeling 101
NoSQL Data Modeling 101NoSQL Data Modeling 101
NoSQL Data Modeling 101
 

Dernier

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
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+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...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (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 ..
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
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
 
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...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 
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
 
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
 
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...
 
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​
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
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, ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
+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...
 
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
 
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
 

The Consistency vs Throughput Tradeoff in Distributed Databases

  • 1. The Consistency vs Throughput Tradeoff in Distributed Databases Daniel Abadi, Darnell-Kanal Professor
  • 2. Introduction Distributed database systems: ■ CAP theorem: you must trade availability for consistency ■ PACELC theorem: you must trade latency for consistency ■ But do you have to trade throughput for consistency???
  • 3. Background Widget ID Price In_Stock 1 99 4 2 325 12 3 79 1 4 199 7 Customer id Store_ Credit 1 0 2 100 3 50 4 0 5 10 6 500 7 0 8 25 Customer 2 buys widget 3 with store credit: W = Widgets.READ(3) C = Customers.READ(2) IF (W.In_Stock < 1) ABORT IF (C.Store_Credit < W.price) ABORT W.In_Stock -= 1 C.Store_Credit -= W.price
  • 4. Background Widget ID Price In_Stock 1 99 4 2 325 12 3 79 0 4 199 7 Customer id Store_ Credit 1 0 2 100 3 50 4 0 5 10 6 500 7 0 8 25 Customer 2 buys widget 3 with store credit: W = Widgets.READ(3) C = Customers.READ(2) IF (W.In_Stock < 1) ABORT IF (C.Store_Credit < W.price) ABORT W.In_Stock -= 1 C.Store_Credit -= W.price
  • 5. Background Widget ID Price In_Stock 1 99 4 2 325 12 3 79 0 4 199 7 Customer id Store_ Credit 1 0 2 21 3 50 4 0 5 10 6 500 7 0 8 25 Customer 2 buys widget 3 with store credit: W = Widgets.READ(3) C = Customers.READ(2) IF (W.In_Stock < 1) ABORT IF (C.Store_Credit < W.price) ABORT W.In_Stock -= 1 C.Store_Credit -= W.price
  • 6. Distributed databases are hard Widget ID Price In_Stock 1 99 4 Customer id Store_ Credit 1 0 5 10 Widget ID Price In_Stock 2 325 12 Customer id Store_ Credit 2 100 6 500 Widget ID Price In_Stock 3 79 1 Customer id Store_ Credit 3 50 7 0 Widget ID Price In_Stock 4 199 7 Customer id Store_ Credit 4 0 8 25
  • 7. Distributed databases are hard Widget ID Price In_Stock 2 325 12 Customer id Store_ Credit 2 100 6 500 Widget ID Price In_Stock 3 79 1 Customer id Store_ Credit 3 50 7 0 Customer 2 buys widget 3 with store credit: W = Widgets.READ(3) C = Customers.READ(2) IF (W.In_Stock < 1) ABORT IF (C.Store_Credit < W.price) ABORT W.In_Stock -= 1 C.Store_Credit -= W.price W.price = 79
  • 8. Customer id Store_ Credit 2 21 6 500 Widget ID Price In_Stock 3 79 0 Distributed databases are hard Widget ID Price In_Stock 2 325 12 Customer id Store_ Credit 3 50 7 0 prepare r e a d y c o m m i t d o n e No conflicting transactions can run! W.price = 79 Customer 2 buys widget 3 with store credit: W = Widgets.READ(3) C = Customers.READ(2) IF (W.In_Stock < 1) ABORT IF (C.Store_Credit < W.price) ABORT W.In_Stock -= 1 C.Store_Credit -= W.price
  • 9. Replication exacerbates the problem Widget ID Price In_Stock 2 325 12 Customer id Store_ Credit 2 21 6 500 Widget ID Price In_Stock 3 79 0 Customer id Store_ Credit 3 50 7 0 Widget ID Price In_Stock 2 325 12 Customer id Store_ Credit 2 100 6 500 Widget ID Price In_Stock 3 79 1 Customer id Store_ Credit 3 50 7 0 replicate replicate
  • 10. Replication exacerbates the problem Widget ID Price In_Stock 2 325 12 Customer id Store_ Credit 2 21 6 500 Widget ID Price In_Stock 3 79 0 Customer id Store_ Credit 3 50 7 0 Widget ID Price In_Stock 2 325 12 Customer id Store_ Credit 2 100 6 500 Widget ID Price In_Stock 3 79 1 Customer id Store_ Credit 3 50 7 0 replicate replicate
  • 11. Replication exacerbates the problem Widget ID Price In_Stock 2 325 12 Customer id Store_ Credit 2 21 6 500 Widget ID Price In_Stock 3 79 0 Customer id Store_ Credit 3 50 7 0 Widget ID Price In_Stock 2 325 12 Customer id Store_ Credit 2 21 6 500 Widget ID Price In_Stock 3 79 0 Customer id Store_ Credit 3 50 7 0 done done No conflicting transactions can run! replicate replicate
  • 12. ■ Commit protocol like 2PC ■ Needed for A, C, and D of ACID ■ BUT: ■ Latency of protocol ■ Throughput reduction ■ Synchronous replication ■ Needed for C of CAP ■ BUT: ■ Latency of replication ■ Throughput reduction Summary of performance issues
  • 13. ■ If we have to trade throughout for consistency, it should be PACETLC, not PACELC! ■ But is the throughput tradeoff fundamental? PACETLC?
  • 14. ■ All throughput problems are caused by preventing conflicting transactions from running. Therefore: ■ If we don’t guarantee strong isolation, the problem goes away ■ If there are no conflicting transactions, the problem never exists in the first place ■ Deterministic systems eliminate the throughput tradeoff entirely ■ But that’s a whole other talk! Throughput tradeoff is not fundamental!
  • 15. Thank You Stay in Touch Daniel Abadi abadi@umd.edu @daniel_abadi www.linkedin.com/in/databaseprof