SlideShare uma empresa Scribd logo
1 de 35
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Destaque

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

Destaque (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
 

Semelhante a 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
 

Semelhante a 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
 
Analytics on AWS - IP Expo 2013
Analytics on AWS - IP Expo 2013Analytics on AWS - IP Expo 2013
Analytics on AWS - IP Expo 2013
 
Getting Started with Managed Database Services on AWS
Getting Started with Managed Database Services on AWSGetting Started with Managed Database Services on AWS
Getting Started with Managed Database Services on AWS
 

Último

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Último (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 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