SlideShare a Scribd company logo
Ryan Knight - @knight_cloud
Return of the Transaction King
Brief History of Data
RDBMS + ACID Transactions
Atomic
Consistent
Isolated
Durable
Traditional ACID Transactions
Did not Scale with the Internet
Leader w/ Read Replicas
Distributed Locks
CAP Theorem
Forced Choices
Global Scale or Strong
Consistency?
Rise of Eventual
Consistency
Eventual Consistency
Really a Necessary Evil
Last Write Wins
Event Sourcing
Write now and figure it out later
● DNS, IoT, Time Series, Monitoring, Web Metrics,
Followers, etc.
● Modify Business to Fit - Allow for Inconsistency
○ Inventory - Oversell and cancel order if
necessary
○ Bank - Overdraft and charge
Where Event Sourcing Works
We live in a stateful and finite world!
- James Ward
But ….
Where Event Sourcing Breaks
When Order of Events Matters
Can not write from 2 hosts and
guarantee ordering
Reconcile Diverging History of
Events
Possible to Lose History
Strong Consistency
Differing Views of Strong Consistency
Write / Read Local Quorum
No Read before Write
No Compare and Swap
No Snapshot Isolation
Write Skew
Two concurrent
transactions each
determine what they are
writing based on reading a
data set which overlaps
what the other is writing
begriffs.com
Can we Ignore Consistency?
Pushes consistency problem into
the application where they are
far harder to solve
Eventual Consistency really is a
necessary Evil
Consistency in the
Application Tier
Events Sourcing w/ Command
Serialization
Serialization Points - Kafka
Consumers
What happens when they fail?
Cloud Native / Microservices
Partitioning of the Application Domain and Related
Data
Increased Coordination between Data
Number of Microservices Increases Number of
Interactions
Exponential Growth in Complexity
Cloud Native
+ NoSQL
- ACID
==========
Rube Goldberg
machine
ACID Transactions
Atomic
Consistent / Correct
Isolated
Durable
ACID
TRANSACTIONS
+
EVENT SOURCING
============
RETURN OF
TRANSACTIONS
Modern Transactional Databases
Fauna
Google Spanner
CockroachDB
GLOBAL SCALE + STRONG CONSISTENCY
Value of Transactions
Decrease Application Tier Complexity
Reduce Cognitive Overhead
Increased Developer Productivity
Increased Focus on Business Value
● Deal with People's Money
● Financial Transactions
● Inventory
● Stock Exchange
● Auctions
● Points
When do you need ACID TXN?
Do we really have to sacrifice AP to get C?
But there are two important caveats: first, you only need
forfeit something during an actual partition, and even
then there are many mitigations. Second, the actual
theorem is about 100% availability, while the interesting
discussion here is about the tradeoffs involved for realistic
high availability.
Eric Brewer Spanner Paper
Problems with CAP, and Yahoo’s little
known NoSQL system - Daniel Abadi
Tradeoff between latency (L) and
consistency under normal conditions
Google Spanner
● Private global network along with GPS receivers and atomic
clocks.
● Atomic Clocks for Serializability Guarantees
● AdWords & Google Play for 5+ years
● Google Cloud Platform Control Plane
● No Scheduled Downtime
● Can do maintenance by moving data between nodes.
CockroachDB
Hybrid Logical Clock similar to a vector
clock for ordering of transactions
Challenges with clock skew
Waits up to 250 MS on reads
What is Fauna?
Globally distributed, transactional database
Born out of Twitter and the Calvin Pape
Functional / Type-Safe Query Language
Indexes, Constraints and Views
Fauna Transaction Resolution
Resolves transactions before committing to DB
Execute phase and Commit phase
All Transaction w/ in a epoch our ordered and
applied as a batch
Uses a RAFT replicated log that derives a total
order of all transactions.
Distributed ACID Transaction Engine
Consensus protocols from Raft and Calvin Paper
Can span thousands of records and indexes
Designed for high throughput and WAN replication
Ensures multi-node and multi- datacenter
correctness
Security, Identity, Isolation
Native Security and Access Control
Row-level security, identity, and
isolation
Complete Data Isolation across datasets
Quality of Service Managed Resource Scheduler
Operating System Like Design
Single Cluster for Differing and
Competing Workloads
Temporality
FaunaDB keeps all
instances of a data, not
overwriting them but
creating new ones when a
write is performed. This is
useful especially when
auditing data, verifying its
evolution over time.
Fauna Data Representation
Database
Class(es)
Instanc(es)
Arrays and Scalar Types
Nested Data
Database
Database(s)
Class(es)
Class(es)
Instances
Each record stored as an object.
All objects are instances of a specific class.
Every instance has an identifier called a ref.
An instance’s ref encodes its class along with a
unique id
Functional
Transaction Scope
Not traditional begin / end
transaction
Entire Function / Query
Block is scope of
transaction
Paradigm will feel natural
to Functional Programmers
Similar to Traditional RDBMS
Indexes Terms and Values
Transform, cover, and order
instance data
Enforce unique constraints.
Referenced explicitly in query
expressions;
Optimizer does not make index
applications
Indexes
Example
“Smart
Contract”
● User Nodes w/ Simulated Account Balance
● Server Node acts as Intermediary and
Notary on Contract
● User Nodes Propose Borrowing from Peers
● Peer Accepts or Rejects Proposal
● Contract is Created between Peers Lending
Fixed Amount

More Related Content

What's hot

AWS&Deloitte Blockchain
AWS&Deloitte BlockchainAWS&Deloitte Blockchain
AWS&Deloitte Blockchain
Alé Flores
 
C*ollege Credit: Is My App a Good Fit for Cassandra?
C*ollege Credit: Is My App a Good Fit for Cassandra?C*ollege Credit: Is My App a Good Fit for Cassandra?
C*ollege Credit: Is My App a Good Fit for Cassandra?
DataStax
 
Cpp In Soa
Cpp In SoaCpp In Soa
Cpp In Soa
WSO2
 

What's hot (20)

AWS&Deloitte Blockchain
AWS&Deloitte BlockchainAWS&Deloitte Blockchain
AWS&Deloitte Blockchain
 
Accelerate DevOps/Microservices and Kubernetes
Accelerate DevOps/Microservices and KubernetesAccelerate DevOps/Microservices and Kubernetes
Accelerate DevOps/Microservices and Kubernetes
 
Declare Victory with Big Data
Declare Victory with Big DataDeclare Victory with Big Data
Declare Victory with Big Data
 
Going Reactive in Java with Typesafe Reactive Platform
Going Reactive in Java with Typesafe Reactive PlatformGoing Reactive in Java with Typesafe Reactive Platform
Going Reactive in Java with Typesafe Reactive Platform
 
C*ollege Credit: Is My App a Good Fit for Cassandra?
C*ollege Credit: Is My App a Good Fit for Cassandra?C*ollege Credit: Is My App a Good Fit for Cassandra?
C*ollege Credit: Is My App a Good Fit for Cassandra?
 
DevOpsDays SLC - Getting Along With Your DBOps Team
DevOpsDays SLC - Getting Along With Your DBOps TeamDevOpsDays SLC - Getting Along With Your DBOps Team
DevOpsDays SLC - Getting Along With Your DBOps Team
 
CQRS: Command/Query Responsibility Segregation
CQRS: Command/Query Responsibility SegregationCQRS: Command/Query Responsibility Segregation
CQRS: Command/Query Responsibility Segregation
 
Event Sourcing & CQRS: Down the rabbit hole
Event Sourcing & CQRS: Down the rabbit holeEvent Sourcing & CQRS: Down the rabbit hole
Event Sourcing & CQRS: Down the rabbit hole
 
Microservices - opportunities, dilemmas and problems
Microservices - opportunities, dilemmas and problemsMicroservices - opportunities, dilemmas and problems
Microservices - opportunities, dilemmas and problems
 
Events & Microservices
Events & MicroservicesEvents & Microservices
Events & Microservices
 
Amazon AWS - a quick review
Amazon AWS - a quick reviewAmazon AWS - a quick review
Amazon AWS - a quick review
 
Event-Driven Architecture (EDA)
Event-Driven Architecture (EDA)Event-Driven Architecture (EDA)
Event-Driven Architecture (EDA)
 
How to Design a Backend for IoT
How to Design a Backend for IoTHow to Design a Backend for IoT
How to Design a Backend for IoT
 
MongoDB World 2018: MongoDB for High Volume Time Series Data Streams
MongoDB World 2018: MongoDB for High Volume Time Series Data StreamsMongoDB World 2018: MongoDB for High Volume Time Series Data Streams
MongoDB World 2018: MongoDB for High Volume Time Series Data Streams
 
CQRS
CQRSCQRS
CQRS
 
SQL/NoSQL How to choose ?
SQL/NoSQL How to choose ?SQL/NoSQL How to choose ?
SQL/NoSQL How to choose ?
 
Managing Cloud Security Design and Implementation in a Ransomware World
Managing Cloud Security Design and Implementation in a Ransomware World Managing Cloud Security Design and Implementation in a Ransomware World
Managing Cloud Security Design and Implementation in a Ransomware World
 
Data Works Summit Munich 2017 - Worldpay - Multi Tenancy Clusters
Data Works Summit Munich 2017 - Worldpay - Multi Tenancy ClustersData Works Summit Munich 2017 - Worldpay - Multi Tenancy Clusters
Data Works Summit Munich 2017 - Worldpay - Multi Tenancy Clusters
 
Cpp In Soa
Cpp In SoaCpp In Soa
Cpp In Soa
 
RedisConf18 - Redis on Google Cloud Platform
RedisConf18 - Redis on Google Cloud PlatformRedisConf18 - Redis on Google Cloud Platform
RedisConf18 - Redis on Google Cloud Platform
 

Viewers also liked

「黒騎士と白の魔王」gRPCによるHTTP/2 - API, Streamingの実践
「黒騎士と白の魔王」gRPCによるHTTP/2 - API, Streamingの実践「黒騎士と白の魔王」gRPCによるHTTP/2 - API, Streamingの実践
「黒騎士と白の魔王」gRPCによるHTTP/2 - API, Streamingの実践
Yoshifumi Kawai
 

Viewers also liked (7)

AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017
AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017
AI and Machine Learning Demystified by Carol Smith at Midwest UX 2017
 
Matrix Factorizations for Recommender Systems
Matrix Factorizations for Recommender SystemsMatrix Factorizations for Recommender Systems
Matrix Factorizations for Recommender Systems
 
Pythonが動く仕組み(の概要)
Pythonが動く仕組み(の概要)Pythonが動く仕組み(の概要)
Pythonが動く仕組み(の概要)
 
Nelson: Rigorous Deployment for a Functional World
Nelson: Rigorous Deployment for a Functional WorldNelson: Rigorous Deployment for a Functional World
Nelson: Rigorous Deployment for a Functional World
 
JVM上で動くPython処理系実装のススメ
JVM上で動くPython処理系実装のススメJVM上で動くPython処理系実装のススメ
JVM上で動くPython処理系実装のススメ
 
「黒騎士と白の魔王」gRPCによるHTTP/2 - API, Streamingの実践
「黒騎士と白の魔王」gRPCによるHTTP/2 - API, Streamingの実践「黒騎士と白の魔王」gRPCによるHTTP/2 - API, Streamingの実践
「黒騎士と白の魔王」gRPCによるHTTP/2 - API, Streamingの実践
 
Disorder And Tolerance In Distributed Systems At Scale
Disorder And Tolerance In Distributed Systems At ScaleDisorder And Tolerance In Distributed Systems At Scale
Disorder And Tolerance In Distributed Systems At Scale
 

Similar to Return of the transaction king

AWS reInvent 2018 Recap - Solutions Updates Part 2
AWS reInvent 2018 Recap - Solutions Updates Part 2AWS reInvent 2018 Recap - Solutions Updates Part 2
AWS reInvent 2018 Recap - Solutions Updates Part 2
Amazon Web Services
 

Similar to Return of the transaction king (20)

MariaDB today and our vision for the future
MariaDB today and our vision for the futureMariaDB today and our vision for the future
MariaDB today and our vision for the future
 
Red Hat Storage: Emerging Use Cases
Red Hat Storage: Emerging Use CasesRed Hat Storage: Emerging Use Cases
Red Hat Storage: Emerging Use Cases
 
Riak at Engine Yard Cloud
Riak at Engine Yard CloudRiak at Engine Yard Cloud
Riak at Engine Yard Cloud
 
AWS reInvent 2018 Recap - Solutions Updates Part 2
AWS reInvent 2018 Recap - Solutions Updates Part 2AWS reInvent 2018 Recap - Solutions Updates Part 2
AWS reInvent 2018 Recap - Solutions Updates Part 2
 
Kafka & Hadoop in Rakuten
Kafka & Hadoop in RakutenKafka & Hadoop in Rakuten
Kafka & Hadoop in Rakuten
 
Getting Started with Amazon Redshift - AWS July 2016 Webinar Series
Getting Started with Amazon Redshift - AWS July 2016 Webinar SeriesGetting Started with Amazon Redshift - AWS July 2016 Webinar Series
Getting Started with Amazon Redshift - AWS July 2016 Webinar Series
 
Scylla Summit 2022: An Odyssey to ScyllaDB and Apache Kafka
Scylla Summit 2022: An Odyssey to ScyllaDB and Apache KafkaScylla Summit 2022: An Odyssey to ScyllaDB and Apache Kafka
Scylla Summit 2022: An Odyssey to ScyllaDB and Apache Kafka
 
Immersion Day - Como simplificar o acesso ao seu ambiente analítico
Immersion Day - Como simplificar o acesso ao seu ambiente analíticoImmersion Day - Como simplificar o acesso ao seu ambiente analítico
Immersion Day - Como simplificar o acesso ao seu ambiente analítico
 
As fast as a grid, as safe as a database
As fast as a grid, as safe as a databaseAs fast as a grid, as safe as a database
As fast as a grid, as safe as a database
 
Azure and cloud design patterns
Azure and cloud design patternsAzure and cloud design patterns
Azure and cloud design patterns
 
Scalable Stream Processing with Apache Samza
Scalable Stream Processing with Apache SamzaScalable Stream Processing with Apache Samza
Scalable Stream Processing with Apache Samza
 
Red Hat Storage Day New York - Red Hat Gluster Storage: Historical Tick Data ...
Red Hat Storage Day New York - Red Hat Gluster Storage: Historical Tick Data ...Red Hat Storage Day New York - Red Hat Gluster Storage: Historical Tick Data ...
Red Hat Storage Day New York - Red Hat Gluster Storage: Historical Tick Data ...
 
Getting Started with Amazon Redshift
Getting Started with Amazon RedshiftGetting Started with Amazon Redshift
Getting Started with Amazon Redshift
 
Amazon Elastic Map Reduce - Ian Meyers
Amazon Elastic Map Reduce - Ian MeyersAmazon Elastic Map Reduce - Ian Meyers
Amazon Elastic Map Reduce - Ian Meyers
 
2017 AWS DB Day | Amazon Redshift 자세히 살펴보기
2017 AWS DB Day | Amazon Redshift 자세히 살펴보기2017 AWS DB Day | Amazon Redshift 자세히 살펴보기
2017 AWS DB Day | Amazon Redshift 자세히 살펴보기
 
Azure Cosmos DB - NoSQL Strikes Back (An introduction to the dark side of you...
Azure Cosmos DB - NoSQL Strikes Back (An introduction to the dark side of you...Azure Cosmos DB - NoSQL Strikes Back (An introduction to the dark side of you...
Azure Cosmos DB - NoSQL Strikes Back (An introduction to the dark side of you...
 
CQRS + Event Sourcing
CQRS + Event SourcingCQRS + Event Sourcing
CQRS + Event Sourcing
 
DynamoDB Deep Dive
DynamoDB Deep DiveDynamoDB Deep Dive
DynamoDB Deep Dive
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
Analytics on AWS - IP Expo 2013
Analytics on AWS - IP Expo 2013Analytics on AWS - IP Expo 2013
Analytics on AWS - IP Expo 2013
 

Recently uploaded

Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 

Recently uploaded (20)

Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
Exploring UiPath Orchestrator API: updates and limits in 2024 🚀
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 

Return of the transaction king

  • 1. Ryan Knight - @knight_cloud Return of the Transaction King
  • 2. Brief History of Data RDBMS + ACID Transactions Atomic Consistent Isolated Durable
  • 3. Traditional ACID Transactions Did not Scale with the Internet Leader w/ Read Replicas Distributed Locks
  • 4. CAP Theorem Forced Choices Global Scale or Strong Consistency? Rise of Eventual Consistency
  • 5. Eventual Consistency Really a Necessary Evil Last Write Wins Event Sourcing Write now and figure it out later
  • 6. ● DNS, IoT, Time Series, Monitoring, Web Metrics, Followers, etc. ● Modify Business to Fit - Allow for Inconsistency ○ Inventory - Oversell and cancel order if necessary ○ Bank - Overdraft and charge Where Event Sourcing Works
  • 7. We live in a stateful and finite world! - James Ward But ….
  • 8. Where Event Sourcing Breaks When Order of Events Matters Can not write from 2 hosts and guarantee ordering Reconcile Diverging History of Events Possible to Lose History
  • 10. Differing Views of Strong Consistency Write / Read Local Quorum No Read before Write No Compare and Swap No Snapshot Isolation
  • 11. Write Skew Two concurrent transactions each determine what they are writing based on reading a data set which overlaps what the other is writing begriffs.com
  • 12. Can we Ignore Consistency? Pushes consistency problem into the application where they are far harder to solve Eventual Consistency really is a necessary Evil
  • 13. Consistency in the Application Tier Events Sourcing w/ Command Serialization Serialization Points - Kafka Consumers What happens when they fail?
  • 14. Cloud Native / Microservices Partitioning of the Application Domain and Related Data Increased Coordination between Data Number of Microservices Increases Number of Interactions Exponential Growth in Complexity
  • 15. Cloud Native + NoSQL - ACID ========== Rube Goldberg machine
  • 16. ACID Transactions Atomic Consistent / Correct Isolated Durable
  • 18. Modern Transactional Databases Fauna Google Spanner CockroachDB GLOBAL SCALE + STRONG CONSISTENCY
  • 19. Value of Transactions Decrease Application Tier Complexity Reduce Cognitive Overhead Increased Developer Productivity Increased Focus on Business Value
  • 20. ● Deal with People's Money ● Financial Transactions ● Inventory ● Stock Exchange ● Auctions ● Points When do you need ACID TXN?
  • 21. Do we really have to sacrifice AP to get C? But there are two important caveats: first, you only need forfeit something during an actual partition, and even then there are many mitigations. Second, the actual theorem is about 100% availability, while the interesting discussion here is about the tradeoffs involved for realistic high availability. Eric Brewer Spanner Paper
  • 22. Problems with CAP, and Yahoo’s little known NoSQL system - Daniel Abadi Tradeoff between latency (L) and consistency under normal conditions
  • 23. Google Spanner ● Private global network along with GPS receivers and atomic clocks. ● Atomic Clocks for Serializability Guarantees ● AdWords & Google Play for 5+ years ● Google Cloud Platform Control Plane ● No Scheduled Downtime ● Can do maintenance by moving data between nodes.
  • 24. CockroachDB Hybrid Logical Clock similar to a vector clock for ordering of transactions Challenges with clock skew Waits up to 250 MS on reads
  • 25. What is Fauna? Globally distributed, transactional database Born out of Twitter and the Calvin Pape Functional / Type-Safe Query Language Indexes, Constraints and Views
  • 26. Fauna Transaction Resolution Resolves transactions before committing to DB Execute phase and Commit phase All Transaction w/ in a epoch our ordered and applied as a batch Uses a RAFT replicated log that derives a total order of all transactions.
  • 27. Distributed ACID Transaction Engine Consensus protocols from Raft and Calvin Paper Can span thousands of records and indexes Designed for high throughput and WAN replication Ensures multi-node and multi- datacenter correctness
  • 28. Security, Identity, Isolation Native Security and Access Control Row-level security, identity, and isolation Complete Data Isolation across datasets
  • 29. Quality of Service Managed Resource Scheduler Operating System Like Design Single Cluster for Differing and Competing Workloads
  • 30. Temporality FaunaDB keeps all instances of a data, not overwriting them but creating new ones when a write is performed. This is useful especially when auditing data, verifying its evolution over time.
  • 31. Fauna Data Representation Database Class(es) Instanc(es) Arrays and Scalar Types Nested Data Database Database(s) Class(es) Class(es)
  • 32. Instances Each record stored as an object. All objects are instances of a specific class. Every instance has an identifier called a ref. An instance’s ref encodes its class along with a unique id
  • 33. Functional Transaction Scope Not traditional begin / end transaction Entire Function / Query Block is scope of transaction Paradigm will feel natural to Functional Programmers
  • 34. Similar to Traditional RDBMS Indexes Terms and Values Transform, cover, and order instance data Enforce unique constraints. Referenced explicitly in query expressions; Optimizer does not make index applications Indexes
  • 35. Example “Smart Contract” ● User Nodes w/ Simulated Account Balance ● Server Node acts as Intermediary and Notary on Contract ● User Nodes Propose Borrowing from Peers ● Peer Accepts or Rejects Proposal ● Contract is Created between Peers Lending Fixed Amount