SlideShare a Scribd company logo
Spanner, True Time & the CAP Theorem
Eric Brewer, 2017
Papers We Love San Diego
May 4th, 2017
Presented by Daniel Norman
@DreamingInCode
Overview
Interesting citations
The original Spanner Paper
Corbett et al, Google Inc, OSDI 2012
Practical uses of synchronized clocks in
distributed systems Liskov, PODC 1991
Standing on Distributed Shoulders of Giants
Helland, ACM Queue June 2016
CAP Twelve Years Later: How the "Rules"
Have Changed Brewer, IEEE Computer 2012
The Network is Reliable
Bailis, Kingsbury, ACM Queue July 2014
Synopsis
● How Spanner works
● The Spanner Paper
● Networks are unreliable, except for Google’s
● Practical use of synchronized clocks
● Synchronized clocks are impossible
● Let’s talk about Minkowski
● ??
● Profit!
● Geo-replicated sharding
● Two Phase Commit / Paxos for R/W transactions
● TrueTime for read-isolation
● “CA” for write transactions
● “CP” for read transactions
What is Spanner?
What does it span?
This bit
{
What does it span?
Bigtable
● Global Database
● High availability
● High performance
● eventually-consistent CDR
● Non-relational
● No SQL-like query language
Megastore
● Global Database
● Somewhat lower performance
● Somewhat lesser availability
● Synchronous CDR
● Semi-relational
● SQL-like Query language
~ This bit ~
What does it span?
Eventual Consistency
● Dynamo
● Cassandra
● CouchBase
● MongoDB
Serializable Consistency
● Mysql
● PostgreSQL
● SQL Server
● Aurora
~ This bit ~
The Spanner Paper
Basics
Limited discussion of:
● How zones work & interact
● Overarching sharding scheme
● Zonemaster and location proxy
Universe
Universe Master
Placement Driver
Zone
Participants
Leader
Lock Table
Tablet
Colossus
Directories
Directory Fragments
DirMove
The Spanner Paper
Basics
Raid 10 / LVM
pv0 pv1
lv0
lv1
lv2
lv3
lv4
pv2
Raid 1
Raid 1
Raid 1
LVM physical extent
assignment
volumes
The Spanner Paper
Basics
Rather like a document database
The Spanner Paper
Basics
The Spanner Paper
Basics
Google network POPs
The Spanner Paper
TrueTime
https://www.wired.com/2012/11/google-spanner-time/
“A person with a watch knows what time
it is. A person with two watches is never
sure” -Segal’s law
The Spanner Paper
TrueTime
Oh
dear...
The Spanner Paper
TrueTime
The Spanner Paper
TrueTime
CAP Twelve Years later, how the “Rules” have changed
Brewer, IEEE Computer, 2012
“CAP theorem ignores latency, although in practice, latency and partitions are deeply related.”
“Aspects of the CAP theorem are often misunderstood, particularly the scope of availability and consistency, which can lead to
undesirable results.”
● Consistency < Apology
● Availability is continuous, not discrete
● Partition = Latency
● CAP “2 of 3” is kind of misleading
https://www.infoq.com/articles/cap-twelve-years-later-how-the-rules-have-changed
The Network is Reliable
Bailis, Kingsbury, ACM Queue 2014
● Network congestion
● Configuration errors
● Router hardware failures
● Spanning tree failures
● FLP Impossibility
http://queue.acm.org/detail.cfm?id=2655736
Practical uses of synchronized clocks in distributed systems
Barbara Liskov, PODC 1991
http://www.dainf.cefetpr.br/~tacla/SDII/PracticalUseOfClocks.pdf
Synchronizing clocks perfectly is not possible
But synchronizing might still be useful
Standing on Distributed Shoulders of Giants
Pat Helland, ACM Queue June 2016
http://queue.acm.org/detail.cfm?id=2953944
Time is notional
Physicists have had their shit
together for a while
Spanner, TrueTime & The CAP Theorem
Partitions are not common
Latency is not a big deal
CP is ok if you spend enough to mitigate A
Spanner, TrueTime & The CAP Theorem
“Miniscule” is a value judgement
Spanner, TrueTime & The CAP Theorem
“Always” is a bit of a bold claim
Read-only transaction consistency assumes:
❌ Minkowski Spacetime
❌ Worst-case drift sufficiently pessimistic
Minkowski Spacetime Curved Spacetime (General Relativity)
https://simple.wikipedia.org/wiki/Minkowski_spacetime
http://sci.esa.int/lisa-pathfinder/56471-measuring-spacetime-curvature/
GET BENT
Simulated Simultaneity
● I think read correctness proof is impossible, or requires novel physics
● Generous error estimation -> clock drift + unpredictable spacetime curvature
● Artificially limited performance due to upper error bound
Conclusion
● Spanner is the DB you’ve been waiting for, sort of
● It basically works (notwithstanding significant questions about correctness)
● But only for Google, not for you
● Pay Google
Thank You!
Papers We Love San Diego
May 4th, 2017
Presented by Daniel Norman
@DreamingInCode
Spanner, True Time & the CAP
Theorem
Eric Brewer, 2017

More Related Content

Similar to PWL San Diego - Spanner, TrueTime & The CAP Theorem

PEARC17: Deploying RMACC Summit: An HPC Resource for the Rocky Mountain Region
PEARC17: Deploying RMACC Summit: An HPC Resource for the Rocky Mountain RegionPEARC17: Deploying RMACC Summit: An HPC Resource for the Rocky Mountain Region
PEARC17: Deploying RMACC Summit: An HPC Resource for the Rocky Mountain Region
pruprecht
 
4Developers 2015: Refactoring za duże pieniądze, pierwsze kroki - Michał Gruca
4Developers 2015: Refactoring za duże pieniądze, pierwsze kroki - Michał Gruca4Developers 2015: Refactoring za duże pieniądze, pierwsze kroki - Michał Gruca
4Developers 2015: Refactoring za duże pieniądze, pierwsze kroki - Michał Gruca
PROIDEA
 
Where refactoring meets big money #4developers
Where refactoring meets big money #4developersWhere refactoring meets big money #4developers
Where refactoring meets big money #4developers
Michał Gruca
 
Spanner : Google' s Globally Distributed Database
Spanner : Google' s Globally Distributed DatabaseSpanner : Google' s Globally Distributed Database
Spanner : Google' s Globally Distributed Database
Ahmedmchayaa
 
Event driven, mobile artificial intelligence algorithms
Event driven, mobile artificial intelligence algorithmsEvent driven, mobile artificial intelligence algorithms
Event driven, mobile artificial intelligence algorithms
Dinesh More
 
Comparing reinforcement learning and access points with rowel
Comparing reinforcement learning and access points with rowelComparing reinforcement learning and access points with rowel
Comparing reinforcement learning and access points with rowel
ijcseit
 
Predicting Space Weather with Docker
Predicting Space Weather with DockerPredicting Space Weather with Docker
Predicting Space Weather with Docker
Docker, Inc.
 
IDENTIFICATION OF EFFICIENT PEERS IN P2P COMPUTING SYSTEM FOR REAL TIME APPLI...
IDENTIFICATION OF EFFICIENT PEERS IN P2P COMPUTING SYSTEM FOR REAL TIME APPLI...IDENTIFICATION OF EFFICIENT PEERS IN P2P COMPUTING SYSTEM FOR REAL TIME APPLI...
IDENTIFICATION OF EFFICIENT PEERS IN P2P COMPUTING SYSTEM FOR REAL TIME APPLI...
ijp2p
 
IDENTIFICATION OF EFFICIENT PEERS IN P2P COMPUTING SYSTEM FOR REAL TIME APPLI...
IDENTIFICATION OF EFFICIENT PEERS IN P2P COMPUTING SYSTEM FOR REAL TIME APPLI...IDENTIFICATION OF EFFICIENT PEERS IN P2P COMPUTING SYSTEM FOR REAL TIME APPLI...
IDENTIFICATION OF EFFICIENT PEERS IN P2P COMPUTING SYSTEM FOR REAL TIME APPLI...
ijp2p
 
Realizing Robust and Scalable Evolutionary Algorithms toward Exascale Era
Realizing Robust and Scalable Evolutionary Algorithms toward Exascale EraRealizing Robust and Scalable Evolutionary Algorithms toward Exascale Era
Realizing Robust and Scalable Evolutionary Algorithms toward Exascale Era
Masaharu Munetomo
 
Harmful interupts
Harmful interuptsHarmful interupts
Harmful interupts
Richard Ashworth
 
CAP Theorem - Theory, Implications and Practices
CAP Theorem - Theory, Implications and PracticesCAP Theorem - Theory, Implications and Practices
CAP Theorem - Theory, Implications and Practices
Yoav Francis
 
International Journal of Computer Science, Engineering and Information Techno...
International Journal of Computer Science, Engineering and Information Techno...International Journal of Computer Science, Engineering and Information Techno...
International Journal of Computer Science, Engineering and Information Techno...
ijcseit
 
Cap in depth
Cap in depthCap in depth
Cap in depth
Ioanna Tsalouchidou
 
Big data & frameworks: no book for you anymore
Big data & frameworks: no book for you anymoreBig data & frameworks: no book for you anymore
Big data & frameworks: no book for you anymore
Stfalcon Meetups
 
Big data & frameworks: no book for you anymore.
Big data & frameworks: no book for you anymore.Big data & frameworks: no book for you anymore.
Big data & frameworks: no book for you anymore.
Roman Nikitchenko
 
unba.se - ACM CSCW 2017 - IWCES15
unba.se - ACM CSCW 2017 - IWCES15unba.se - ACM CSCW 2017 - IWCES15
unba.se - ACM CSCW 2017 - IWCES15
Daniel Norman
 
Security Challenges and the Pacific Research Platform
Security Challenges and the Pacific Research PlatformSecurity Challenges and the Pacific Research Platform
Security Challenges and the Pacific Research Platform
Larry Smarr
 
IEEE Parallel and distributed system 2016 Title and Abstract
IEEE Parallel and distributed system 2016 Title and AbstractIEEE Parallel and distributed system 2016 Title and Abstract
IEEE Parallel and distributed system 2016 Title and Abstract
tsysglobalsolutions
 
Linac Coherent Light Source (LCLS) Data Transfer Requirements
Linac Coherent Light Source (LCLS) Data Transfer RequirementsLinac Coherent Light Source (LCLS) Data Transfer Requirements
Linac Coherent Light Source (LCLS) Data Transfer Requirements
inside-BigData.com
 

Similar to PWL San Diego - Spanner, TrueTime & The CAP Theorem (20)

PEARC17: Deploying RMACC Summit: An HPC Resource for the Rocky Mountain Region
PEARC17: Deploying RMACC Summit: An HPC Resource for the Rocky Mountain RegionPEARC17: Deploying RMACC Summit: An HPC Resource for the Rocky Mountain Region
PEARC17: Deploying RMACC Summit: An HPC Resource for the Rocky Mountain Region
 
4Developers 2015: Refactoring za duże pieniądze, pierwsze kroki - Michał Gruca
4Developers 2015: Refactoring za duże pieniądze, pierwsze kroki - Michał Gruca4Developers 2015: Refactoring za duże pieniądze, pierwsze kroki - Michał Gruca
4Developers 2015: Refactoring za duże pieniądze, pierwsze kroki - Michał Gruca
 
Where refactoring meets big money #4developers
Where refactoring meets big money #4developersWhere refactoring meets big money #4developers
Where refactoring meets big money #4developers
 
Spanner : Google' s Globally Distributed Database
Spanner : Google' s Globally Distributed DatabaseSpanner : Google' s Globally Distributed Database
Spanner : Google' s Globally Distributed Database
 
Event driven, mobile artificial intelligence algorithms
Event driven, mobile artificial intelligence algorithmsEvent driven, mobile artificial intelligence algorithms
Event driven, mobile artificial intelligence algorithms
 
Comparing reinforcement learning and access points with rowel
Comparing reinforcement learning and access points with rowelComparing reinforcement learning and access points with rowel
Comparing reinforcement learning and access points with rowel
 
Predicting Space Weather with Docker
Predicting Space Weather with DockerPredicting Space Weather with Docker
Predicting Space Weather with Docker
 
IDENTIFICATION OF EFFICIENT PEERS IN P2P COMPUTING SYSTEM FOR REAL TIME APPLI...
IDENTIFICATION OF EFFICIENT PEERS IN P2P COMPUTING SYSTEM FOR REAL TIME APPLI...IDENTIFICATION OF EFFICIENT PEERS IN P2P COMPUTING SYSTEM FOR REAL TIME APPLI...
IDENTIFICATION OF EFFICIENT PEERS IN P2P COMPUTING SYSTEM FOR REAL TIME APPLI...
 
IDENTIFICATION OF EFFICIENT PEERS IN P2P COMPUTING SYSTEM FOR REAL TIME APPLI...
IDENTIFICATION OF EFFICIENT PEERS IN P2P COMPUTING SYSTEM FOR REAL TIME APPLI...IDENTIFICATION OF EFFICIENT PEERS IN P2P COMPUTING SYSTEM FOR REAL TIME APPLI...
IDENTIFICATION OF EFFICIENT PEERS IN P2P COMPUTING SYSTEM FOR REAL TIME APPLI...
 
Realizing Robust and Scalable Evolutionary Algorithms toward Exascale Era
Realizing Robust and Scalable Evolutionary Algorithms toward Exascale EraRealizing Robust and Scalable Evolutionary Algorithms toward Exascale Era
Realizing Robust and Scalable Evolutionary Algorithms toward Exascale Era
 
Harmful interupts
Harmful interuptsHarmful interupts
Harmful interupts
 
CAP Theorem - Theory, Implications and Practices
CAP Theorem - Theory, Implications and PracticesCAP Theorem - Theory, Implications and Practices
CAP Theorem - Theory, Implications and Practices
 
International Journal of Computer Science, Engineering and Information Techno...
International Journal of Computer Science, Engineering and Information Techno...International Journal of Computer Science, Engineering and Information Techno...
International Journal of Computer Science, Engineering and Information Techno...
 
Cap in depth
Cap in depthCap in depth
Cap in depth
 
Big data & frameworks: no book for you anymore
Big data & frameworks: no book for you anymoreBig data & frameworks: no book for you anymore
Big data & frameworks: no book for you anymore
 
Big data & frameworks: no book for you anymore.
Big data & frameworks: no book for you anymore.Big data & frameworks: no book for you anymore.
Big data & frameworks: no book for you anymore.
 
unba.se - ACM CSCW 2017 - IWCES15
unba.se - ACM CSCW 2017 - IWCES15unba.se - ACM CSCW 2017 - IWCES15
unba.se - ACM CSCW 2017 - IWCES15
 
Security Challenges and the Pacific Research Platform
Security Challenges and the Pacific Research PlatformSecurity Challenges and the Pacific Research Platform
Security Challenges and the Pacific Research Platform
 
IEEE Parallel and distributed system 2016 Title and Abstract
IEEE Parallel and distributed system 2016 Title and AbstractIEEE Parallel and distributed system 2016 Title and Abstract
IEEE Parallel and distributed system 2016 Title and Abstract
 
Linac Coherent Light Source (LCLS) Data Transfer Requirements
Linac Coherent Light Source (LCLS) Data Transfer RequirementsLinac Coherent Light Source (LCLS) Data Transfer Requirements
Linac Coherent Light Source (LCLS) Data Transfer Requirements
 

Recently uploaded

E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
kalichargn70th171
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 

Recently uploaded (20)

E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 

PWL San Diego - Spanner, TrueTime & The CAP Theorem

  • 1. Spanner, True Time & the CAP Theorem Eric Brewer, 2017 Papers We Love San Diego May 4th, 2017 Presented by Daniel Norman @DreamingInCode
  • 2. Overview Interesting citations The original Spanner Paper Corbett et al, Google Inc, OSDI 2012 Practical uses of synchronized clocks in distributed systems Liskov, PODC 1991 Standing on Distributed Shoulders of Giants Helland, ACM Queue June 2016 CAP Twelve Years Later: How the "Rules" Have Changed Brewer, IEEE Computer 2012 The Network is Reliable Bailis, Kingsbury, ACM Queue July 2014
  • 3. Synopsis ● How Spanner works ● The Spanner Paper ● Networks are unreliable, except for Google’s ● Practical use of synchronized clocks ● Synchronized clocks are impossible ● Let’s talk about Minkowski ● ?? ● Profit!
  • 4. ● Geo-replicated sharding ● Two Phase Commit / Paxos for R/W transactions ● TrueTime for read-isolation ● “CA” for write transactions ● “CP” for read transactions What is Spanner?
  • 5. What does it span? This bit {
  • 6. What does it span? Bigtable ● Global Database ● High availability ● High performance ● eventually-consistent CDR ● Non-relational ● No SQL-like query language Megastore ● Global Database ● Somewhat lower performance ● Somewhat lesser availability ● Synchronous CDR ● Semi-relational ● SQL-like Query language ~ This bit ~
  • 7. What does it span? Eventual Consistency ● Dynamo ● Cassandra ● CouchBase ● MongoDB Serializable Consistency ● Mysql ● PostgreSQL ● SQL Server ● Aurora ~ This bit ~
  • 8. The Spanner Paper Basics Limited discussion of: ● How zones work & interact ● Overarching sharding scheme ● Zonemaster and location proxy
  • 9. Universe Universe Master Placement Driver Zone Participants Leader Lock Table Tablet Colossus Directories Directory Fragments DirMove The Spanner Paper Basics
  • 10.
  • 11. Raid 10 / LVM pv0 pv1 lv0 lv1 lv2 lv3 lv4 pv2 Raid 1 Raid 1 Raid 1 LVM physical extent assignment volumes
  • 12. The Spanner Paper Basics Rather like a document database
  • 15. The Spanner Paper TrueTime https://www.wired.com/2012/11/google-spanner-time/ “A person with a watch knows what time it is. A person with two watches is never sure” -Segal’s law
  • 19. CAP Twelve Years later, how the “Rules” have changed Brewer, IEEE Computer, 2012 “CAP theorem ignores latency, although in practice, latency and partitions are deeply related.” “Aspects of the CAP theorem are often misunderstood, particularly the scope of availability and consistency, which can lead to undesirable results.” ● Consistency < Apology ● Availability is continuous, not discrete ● Partition = Latency ● CAP “2 of 3” is kind of misleading https://www.infoq.com/articles/cap-twelve-years-later-how-the-rules-have-changed
  • 20. The Network is Reliable Bailis, Kingsbury, ACM Queue 2014 ● Network congestion ● Configuration errors ● Router hardware failures ● Spanning tree failures ● FLP Impossibility http://queue.acm.org/detail.cfm?id=2655736
  • 21. Practical uses of synchronized clocks in distributed systems Barbara Liskov, PODC 1991 http://www.dainf.cefetpr.br/~tacla/SDII/PracticalUseOfClocks.pdf Synchronizing clocks perfectly is not possible But synchronizing might still be useful
  • 22. Standing on Distributed Shoulders of Giants Pat Helland, ACM Queue June 2016 http://queue.acm.org/detail.cfm?id=2953944 Time is notional Physicists have had their shit together for a while
  • 23. Spanner, TrueTime & The CAP Theorem Partitions are not common Latency is not a big deal CP is ok if you spend enough to mitigate A
  • 24. Spanner, TrueTime & The CAP Theorem “Miniscule” is a value judgement
  • 25. Spanner, TrueTime & The CAP Theorem “Always” is a bit of a bold claim Read-only transaction consistency assumes: ❌ Minkowski Spacetime ❌ Worst-case drift sufficiently pessimistic
  • 26. Minkowski Spacetime Curved Spacetime (General Relativity) https://simple.wikipedia.org/wiki/Minkowski_spacetime http://sci.esa.int/lisa-pathfinder/56471-measuring-spacetime-curvature/ GET BENT
  • 27. Simulated Simultaneity ● I think read correctness proof is impossible, or requires novel physics ● Generous error estimation -> clock drift + unpredictable spacetime curvature ● Artificially limited performance due to upper error bound
  • 28. Conclusion ● Spanner is the DB you’ve been waiting for, sort of ● It basically works (notwithstanding significant questions about correctness) ● But only for Google, not for you ● Pay Google
  • 29. Thank You! Papers We Love San Diego May 4th, 2017 Presented by Daniel Norman @DreamingInCode Spanner, True Time & the CAP Theorem Eric Brewer, 2017