SlideShare ist ein Scribd-Unternehmen logo
1 von 45
Deterministic Global
Database Consistency
Chris Anderson | @jchris
2
Chris Anderson
Director of Developer Evangelism at Fauna
- Cofounder of Couchbase
- Architect of Couchbase Mobile
- Bachelor’s degree in philosophy from Reed
College
- O'Reilly technical book author
- Leads Fauna's developer community
About the Speakers
3
Meeting Agenda
• Fauna overview
• Storage engine
• Transaction protocol
• Founded in 2012 by the team that scaled Twitter’s infrastructure
• $25M Series A, largest ever by an OLTP database company
• Headquartered in San Francisco, CA
• FaunaDB – Operational database for the modern enterprise
Our Angels
Kevin Scott
CTO, Microsoft
Olivier Pomel
CEO, Datadog
Mazen Al-Rawashdeh
VP, eBay
Larry Gadea
CEO, Envoy
Our Investors
Company Background
Š Fauna, Inc. 2018 4
FaunaDB: A Relational NoSQL Database
Relational DBs NoSQL DBsDistributed
Scalable
Flexible
Consistent
Transactional
Secure
+
+
Innovations
Cloud-Native
Š Fauna, Inc. 2018 5
Š Fauna, Inc. 2018 6
Core Innovations
Distributed ACID Transactions
Single-phase distributed txns algorithm
maximizes throughput and minimizes latency
Fault tolerance
Redundant, self-healing clustering with no loss
of liveness or durability
Operational simplicity
Dramatically simple multi- cluster management
Unified Multi-model Interface
Interact with all your data using the model
that suits your business requirements
High Security
Row-level identity, authentication,
and access control
Multi-tenancy
Shared services environments with QoS
prioritization and chargeback
Temporality
Run queries on historical data at any
point-in-time or as change feeds
Horizontal scalability
Scale from a single machine to multiple
datacenters and clouds with no downtime
Unified vs Partitioned
Consensus
Thanks to Daniel Abadi and for contributing research
and material. Learn more from this blog post
https://fauna.com/blog/faunadb-transaction-protocol
If write completes, all future reads must read that write (or a later
write)
(Formal meaning of “consistency” in CAP theorem)
The term “strict serializability” used for similar guarantee for
transactions
• If transaction A writes to data item X and commits
• If transactions B starts after A commits (in real world time) and reads X
• B’s read of X must be the value that A wrote (or some value written by a transaction that committed after A)
Example:
• Alice wants to throw surprise party for Charlie
• (1) First, she blocks Charlie in our social messaging app
• (2) Then she posts message saying “Surprise party for Charlie tonight!”
• (3) Charlie logs in. His client reads the writes from both (1) and (2) in order to figure out which of Alice’s messages
to display
• Since (2) started after (1) completed, and (3) after (2), it should be impossible for Charlie to see Alice’s new
Linearizability
Š Fauna, Inc. 2018 8
Consensus protocols ensure that events
never delivered out of order
• So it is impossible for (2) to arrive at a replica
without (1)
Linearizability and consensus
Š Fauna, Inc. 2018 9
Palo Alto
Boston
London
User Blocks
Alice Bob
Alice Charlie
User Message
Alice I will be hosting a party tonight
Alice What a great party!
Alice Surprise party for Charlie at 8PM!
User Blocks
Alice Bob
Alice Charlie
User Message
Alice I will be hosting a party tonight
Alice What a great party!
User Blocks
Alice Bob
Alice Charlie
User Message
Alice I will be hosting a party tonight
Alice What a great party!
Alice Surprise party for Charlie at 8PM!
(1)
(2)
Updates happen on different partitions
How should we do consensus?
But what if data is partitioned?
Š Fauna, Inc. 2018 10
Palo Alto
Boston
London
User Message
Alice I will be hosting a party tonight
Alice What a great party!
User Message
Alice I will be hosting a party tonight
Alice What a great party!
User Blocks
Alice Bob
User Blocks
Alice Bob
User Message
Alice I will be hosting a party tonight
Alice What a great party!
User Blocks
Alice Bob
Updates happen on different partitions
How should we do consensus?
But what if data is partitioned?
Š Fauna, Inc. 2018 11
Palo Alto
Boston
London
User Message
Alice I will be hosting a party tonight
Alice What a great party!
User Message
Alice I will be hosting a party tonight
Alice What a great party!
Alice Surprise party for Charlie at 8PM!
User Blocks
Alice Bob
User Blocks
Alice Bob
User Message
Alice I will be hosting a party tonight
Alice What a great party!
(1)
(2)
User Blocks
Alice Bob
Alice Charlie
Option 1: Have separate consensus
protocols per partition
But what if data is partitioned?
Š Fauna, Inc. 2018 12
Palo Alto
Boston
London
User Blocks
Alice Bob
Alice Charlie
User Message
Alice I will be hosting a party tonight
Alice What a great party!
Alice Surprise party for Charlie at 8PM!
User Blocks
Alice Bob
Alice Charlie
User Blocks
Alice Bob
Alice Charlie
User Message
Alice I will be hosting a party tonight
Alice What a great party!
Alice Surprise party for Charlie at 8PM!
User Message
Alice I will be hosting a party tonight
Alice What a great party!
Alice Surprise party for Charlie at 8PM!
(1)
(2)
Option 1: Have separate consensus
protocols per partition
But what if data is partitioned?
Š Fauna, Inc. 2018 13
Palo Alto
Boston
London
User Blocks
Alice Bob
Alice Charlie
User Message
Alice I will be hosting a party tonight
Alice What a great party!
Alice Surprise party for Charlie at 8PM!
User Blocks
Alice Bob
Alice Charlie
User Blocks
Alice Bob
Alice Charlie
User Message
Alice I will be hosting a party tonight
Alice What a great party!
Alice Surprise party for Charlie at 8PM!
User Message
Alice I will be hosting a party tonight
Alice What a great party!
Alice Surprise party for Charlie at 8PM!
(1)
(2)
But now a delayed message can result in
out of order updates
• If Charlie’s browser reads from replica in
London, his surprise will be ruined!
Partitioned consensus
Š Fauna, Inc. 2018 14
Palo Alto
Boston
London
User Blocks
Alice Bob
Alice Charlie
User Message
Alice I will be hosting a party tonight
Alice What a great party!
Alice Surprise party for Charlie at 8PM!
User Blocks
Alice Bob
User Blocks
Alice Bob
Alice Charlie
User Message
Alice I will be hosting a party tonight
Alice What a great party!
Alice Surprise party for Charlie at 8PM!
User Message
Alice I will be hosting a party tonight
Alice What a great party!
Alice Surprise party for Charlie at 8PM!
(1)
(2)
Another problem: what if (1) and (2) were
part of same atomic xact?
• Very unlikely that messages for (1) and (2) will
get to different nodes on replica at exactly same
time
• So how do we create a snapshot that doesn’t violate
atomicity?
Partitioned consensus
Š Fauna, Inc. 2018 15
Palo Alto
Boston
London
User Blocks
Alice Bob
Alice Charlie
User Message
Alice I will be hosting a party tonight
Alice What a great party!
Alice Surprise party for Charlie at 8PM!
User Blocks
Alice Bob
Alice Charlie
User Blocks
Alice Bob
Alice Charlie
User Message
Alice I will be hosting a party tonight
Alice What a great party!
Alice Surprise party for Charlie at 8PM!
User Message
Alice I will be hosting a party tonight
Alice What a great party!
Alice Surprise party for Charlie at 8PM!
(1)
(2)
Give each transaction a timestamp
• If transaction A commits before transaction B starts, it must
have an earlier timestamp
• But how to ensure if A and B are accessing disjoint set of machines?
• Use real time!
• But then clocks have to be synchronized across machines (within a maximum error
bound)
To take a snapshot that doesn’t violate atomicity
• Choose timestamp
• At each machine, read data as of that timestamp
• Read last version of each data item written before this timestamp
Spanner’s solution
Š Fauna, Inc. 2018 16
Option 2: Have just one (unified)
consensus protocol
• Combine atomic transactions ops into
one log event
But what if data is partitioned?
Š Fauna, Inc. 2018 17
Palo Alto
Boston
London
(2)Alice,“SurprisepartyforCharlieat
8PM!”
User Blocks
Alice Bob
Alice Charlie
User Message
Alice I will be hosting a party tonight
Alice What a great party!
Alice Surprise party for Charlie at 8PM!
User Blocks
Alice Bob
Alice Charlie
User Blocks
Alice Bob
Alice Charlie
User Message
Alice I will be hosting a party tonight
Alice What a great party!
Alice Surprise party for Charlie at 8PM!
User Message
Alice I will be hosting a party tonight
Alice What a great party!
Alice Surprise party for Charlie at 8PM!
(1)
(2)
Two huge requirements
• Clocks must be synchronized
• Hard to accomplish in practice
• Google relies on help from hardware --- atomic clocks and GPS
• Rumored to have 16 full time engineers helping to maintain synchronization
• Correctness of protocol assumes certain knowledge of maximum possible
skew
• All transactions must wait by size of this maximum before commit
• Extremely hard to maintain certain knowledge --- stuff happens!
• Assumptions can get violated with sudden clock jumps (e.g. VM migration)
Consequences of these requirements
• IT staff must devote resources to clock synchronization, or pay cloud provider
a premium for this functionality
• Application developers must code around possibility of consistency violations
that may arise as a result of clock skew jumps
• Increases complexity
Partitioned Consensus with Spanner
Š Fauna, Inc. 2018 18
Unified consensus does not require clock synchronization
• Reduces IT complexity / costs
• No assumptions about maximum synchronization error bound
• Reduces complexity for application developer
Disadvantage of unified consensus
• Can be a scale bottleneck
• Batching multiple events in each consensus round can alleviate scale problems
• Calvin able to perform consensus on 500,000 transactions a second
• Can go higher with hierachitica
• Temporary outages during consensus leader election more global (entire
system cannot accept writes until new leader elected)
• Outage for partitioned consensus only for that partition
• But either way, this outage is only for a few seconds
• Slightly reduced flexibility in achieving low-latency read-only transactions
• Partitioned consensus can have different leaders in different regions
Unified consensus (Calvin/FaunaDB)
Š Fauna, Inc. 2018 19
Deterministic Global
Database Consistency
Thanks to Daniel Abadi and for contributing research
and material. Learn more from this blog post
https://fauna.com/blog/faunadb-transaction-protocol
Transaction Log and MVCC Storage
Š Fauna, Inc. 2018 21
Horizontally scalable storage
Š Fauna, Inc. 2018 22
Each replica can be sharded into its own
number of partitions.
Reads use the version for the correct snapshot
Replicas in multiple regions
Š Fauna, Inc. 2018 23
Single phase commit protocol
is uniquely well suited to
applications with widely
dispersed regions.
Deterministic Transaction Protocol
Š Fauna, Inc. 2018 24
Different from Google
Spanner
No atomic clocks
Software only
Stronger guarantees
Deterministic Transaction Protocol
Š Fauna, Inc. 2018 25
Use a preprocessor to handle client communications, and create a log of
submitted xacts
Send log in batched to DBMS
Every xact immediately requests all locks it will need (in order of log)
If it doesn’t know what it will need
• Run enough of the xact to find out, but do not change the database state
• Reissue xact to the preprocessor with lock requirements include as parameter
• Run enough of the new xact to find out if it locked the correct items
(database state might have changed in the meantime)
• If so, then xact can proceed as normal
• If not, reissue again to the preprocessor and repeat as necessary
Trivial to prove this is deterministic and deadlock-free
Transaction Protocol Example
Š Fauna, Inc. 2018 26
Two customers want to purchase the same item, submit transactions to
geographically dispersed replicas
Transaction Protocol Example
Š Fauna, Inc. 2018 27
Two customers want to
purchase the same item,
submit transactions to
geographically dispersed
replicas
Coordinators issue reads
Š Fauna, Inc. 2018 28
The set of read data is
calculated by the coordinator
before the transaction is
proposed to the log. Some data
may be fetched from other
hosts in the replica. Snapshot
reads make this consistent.
Coordinators calculate write effects
Š Fauna, Inc. 2018 29
Writes are known locally before
the transaction is submitted,
and are submitted as part of
the transaction.
Coordinators submit transactions to the log
Š Fauna, Inc. 2018 30
All transactions have a
consensus position in the log,
determined by a RAFT like
protocol.
Replicas validate transaction reads
Š Fauna, Inc. 2018 31
Transactions are validated before
they are applied.
Reads that were made on the
coordinator, at an earlier
snapshot, are rerun at the log’s
current snapshot, preserving
serializability.
Replicas apply transactions
Š Fauna, Inc. 2018 32
If the reads are the same, the
transaction can commit its
buffered writes.
Validating a transaction with changed reads
Š Fauna, Inc. 2018 33
In this case, re-running the
reads gives IN STOCK = 0
instead of 1, which the
coordinator was expecting.
Abort a transaction when reads don’t match
Š Fauna, Inc. 2018 34
This is deterministic, so replicas
can decide to abort without
coordination.
The transaction is retried by the
coordinator, and fails with the
expected “out of stock” error.
Capability Drill-down
Š Fauna, Inc. 2018 44
Strong global data consistency in real-time
• Patent-pending single-phase commit
provides lowest possible global latency
• Transactions are not restricted to
data in a single site or shard
• Distributed log based algorithm
scales throughput with cluster size
• Reads are always site-local and
transactionally consistent
• Global transaction order preserves
external cause-and-effect
100% ACID
NoSQL, yet Relational
• Semi-structured documents that can store any
application data model
• Real-time indexing system enables querying using
multiple models within the same query
• Transaction expressiveness is similar to a modern
programming language
• Query language designed to fit into the current
development paradigms
• Embedded in application code, similar to LINQ or an
ORM
• Record-level access control enforces application
permissions
Unified Multi-Model Data Interactions
Read
Write
FQL API Interface
45Š Fauna, Inc. 2018
Multi-Model Interface
Š Fauna, Inc. 2018 46
Operational Simplicity
Operational simplicity unlike any other
• Setup multi-node, multi-region clusters in minutes
• Automatically manages database state to match
declared topology
• Built-in request routing shields cluster topology
from clients
• Rich command line interface / API to manipulate
nodes and clusters
• ACID compliant macro commands drastically
reduce risk
Elastic DevOps
Š Fauna, Inc. 2018 47
Policy-based data isolation and security
• All client interactions require an API key by default
• Per-record access policy is highly customizable to application needs
• End-user credentials management secures data access on per-user basis
• QoS: Identity-based allocation of cluster resources
• Client/server and server/server network connections encrypted via TLS
• Temporal data model builds in auditing capabilities
High Security
Secure by Design
Š Fauna, Inc. 2018 48
Roll out your shared services without risk
• Separates developer, schema admin, and cluster management
• Allows a single database group to service multiple internal teams
• Application teams can be self-service and isolated
• Tenant-aware QoS allows for safe mixed workloads
• Track who is consuming what and how much (for chargeback)
• Policy-based access to shared transactional data
Multi-Tenancy
Prioritized Requests | Schema Isolation | Seamless Clustering
Built-in Multi-tenancy
Š Fauna, Inc. 2018 49
Snapshot isolation and configurable data retention
• Maintains the evolution of data over time, much like change tracking
in documents
• Queries can be run against the current time or a snapshot point in
time or a composite
• Event queries can alert you when new results match specific criteria
• Data retention supports intelligent change management, including
retroactive event updates to repair data input errors
• Extremely useful in use cases such as social activity feeds, recent
updates, syncing occasionally connected mobile and IoT devices
Temporality
Temporality: Track Your Data over Time
Š Fauna, Inc. 2018 50
FaunaDB Node
Self-contained FaunaDB Node: Single Binary
Priority-based Scheduler
Fauna ACID Transaction Engine
(FATE)
Temporal Data Storage
Fauna Query Interface
Schemaless
Docs
Relational
Indexes
Tenant / Role
Access Control
Replicated
Write Ahead Log
Cluster Manager
Š Fauna, Inc. 2018 52
Future-proofs your data architecture
• Limitless horizontal and vertical scale
• Infrastructure agnostic, minimal dependencies (jvm)
• Easily deploys and performs on commodity hardware
• Multi-cloud and hybrid deployment options
Designed for Modern Datacenters
Š Fauna, Inc. 2018 53
Roadmap
Workload Consolidation
Search,
Graph, Geo
HTAP
Streaming
Data
Data Governance
Policy-based
Control
Encrypted Queries
Locality
Control
Datacenter Automation
Compute
Convergence
Automated
Recovery
Automated Scaling
Mission Critical Platform
100% ACID
Complete Flexibility
Operational
Simplicity
Thank You

Weitere ähnliche Inhalte

Ähnlich wie QCONSF - FaunaDB Deterministic Transactions

Dmk blackops2006
Dmk blackops2006Dmk blackops2006
Dmk blackops2006
Dan Kaminsky
 

Ähnlich wie QCONSF - FaunaDB Deterministic Transactions (20)

Debunking Six Common Myths in Stream Processing
Debunking Six Common Myths in Stream ProcessingDebunking Six Common Myths in Stream Processing
Debunking Six Common Myths in Stream Processing
 
Kostas Tzoumas - Stream Processing with Apache FlinkÂŽ
Kostas Tzoumas - Stream Processing with Apache FlinkÂŽKostas Tzoumas - Stream Processing with Apache FlinkÂŽ
Kostas Tzoumas - Stream Processing with Apache FlinkÂŽ
 
Debunking Common Myths in Stream Processing
Debunking Common Myths in Stream ProcessingDebunking Common Myths in Stream Processing
Debunking Common Myths in Stream Processing
 
Building Real-Time Web Applications
Building Real-Time Web ApplicationsBuilding Real-Time Web Applications
Building Real-Time Web Applications
 
Big data and APIs for PHP developers - SXSW 2011
Big data and APIs for PHP developers - SXSW 2011Big data and APIs for PHP developers - SXSW 2011
Big data and APIs for PHP developers - SXSW 2011
 
What is Blockchain and why should we care?
What is Blockchain and why should we care?What is Blockchain and why should we care?
What is Blockchain and why should we care?
 
Ecosystem WG
Ecosystem WGEcosystem WG
Ecosystem WG
 
InfluxDB Community Office Hours September 2020
InfluxDB Community Office Hours September 2020 InfluxDB Community Office Hours September 2020
InfluxDB Community Office Hours September 2020
 
Griffey: Gadgets in the Library
Griffey: Gadgets in the LibraryGriffey: Gadgets in the Library
Griffey: Gadgets in the Library
 
Dmk blackops2006
Dmk blackops2006Dmk blackops2006
Dmk blackops2006
 
Head in the_clouds_feet_firmly_on_the_ground mar.ppt
Head in the_clouds_feet_firmly_on_the_ground mar.pptHead in the_clouds_feet_firmly_on_the_ground mar.ppt
Head in the_clouds_feet_firmly_on_the_ground mar.ppt
 
The Internet You Want
The Internet You WantThe Internet You Want
The Internet You Want
 
Interactive real-time dashboards on data streams using Kafka, Druid, and Supe...
Interactive real-time dashboards on data streams using Kafka, Druid, and Supe...Interactive real-time dashboards on data streams using Kafka, Druid, and Supe...
Interactive real-time dashboards on data streams using Kafka, Druid, and Supe...
 
Robust stream processing with Apache Flink
Robust stream processing with Apache FlinkRobust stream processing with Apache Flink
Robust stream processing with Apache Flink
 
Wham lan party
Wham lan partyWham lan party
Wham lan party
 
CarolinaCon Presentation on Streaming Analytics
CarolinaCon Presentation on Streaming AnalyticsCarolinaCon Presentation on Streaming Analytics
CarolinaCon Presentation on Streaming Analytics
 
Some thoughts on IoT, HKNOG 4.0
Some thoughts on IoT, HKNOG 4.0Some thoughts on IoT, HKNOG 4.0
Some thoughts on IoT, HKNOG 4.0
 
Caterpillar’s move to the cloud: cutting edge tools for a cutting-edge business
Caterpillar’s move to the cloud: cutting edge tools for a cutting-edge businessCaterpillar’s move to the cloud: cutting edge tools for a cutting-edge business
Caterpillar’s move to the cloud: cutting edge tools for a cutting-edge business
 
BigchainDB and Beyond
BigchainDB and BeyondBigchainDB and Beyond
BigchainDB and Beyond
 
Release the Monkeys ! Testing in the Wild at Netflix
Release the Monkeys !  Testing in the Wild at NetflixRelease the Monkeys !  Testing in the Wild at Netflix
Release the Monkeys ! Testing in the Wild at Netflix
 

KĂźrzlich hochgeladen

KĂźrzlich hochgeladen (20)

Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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
 
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...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

QCONSF - FaunaDB Deterministic Transactions

  • 2. 2 Chris Anderson Director of Developer Evangelism at Fauna - Cofounder of Couchbase - Architect of Couchbase Mobile - Bachelor’s degree in philosophy from Reed College - O'Reilly technical book author - Leads Fauna's developer community About the Speakers
  • 3. 3 Meeting Agenda • Fauna overview • Storage engine • Transaction protocol
  • 4. • Founded in 2012 by the team that scaled Twitter’s infrastructure • $25M Series A, largest ever by an OLTP database company • Headquartered in San Francisco, CA • FaunaDB – Operational database for the modern enterprise Our Angels Kevin Scott CTO, Microsoft Olivier Pomel CEO, Datadog Mazen Al-Rawashdeh VP, eBay Larry Gadea CEO, Envoy Our Investors Company Background Š Fauna, Inc. 2018 4
  • 5. FaunaDB: A Relational NoSQL Database Relational DBs NoSQL DBsDistributed Scalable Flexible Consistent Transactional Secure + + Innovations Cloud-Native Š Fauna, Inc. 2018 5
  • 6. Š Fauna, Inc. 2018 6 Core Innovations Distributed ACID Transactions Single-phase distributed txns algorithm maximizes throughput and minimizes latency Fault tolerance Redundant, self-healing clustering with no loss of liveness or durability Operational simplicity Dramatically simple multi- cluster management Unified Multi-model Interface Interact with all your data using the model that suits your business requirements High Security Row-level identity, authentication, and access control Multi-tenancy Shared services environments with QoS prioritization and chargeback Temporality Run queries on historical data at any point-in-time or as change feeds Horizontal scalability Scale from a single machine to multiple datacenters and clouds with no downtime
  • 7. Unified vs Partitioned Consensus Thanks to Daniel Abadi and for contributing research and material. Learn more from this blog post https://fauna.com/blog/faunadb-transaction-protocol
  • 8. If write completes, all future reads must read that write (or a later write) (Formal meaning of “consistency” in CAP theorem) The term “strict serializability” used for similar guarantee for transactions • If transaction A writes to data item X and commits • If transactions B starts after A commits (in real world time) and reads X • B’s read of X must be the value that A wrote (or some value written by a transaction that committed after A) Example: • Alice wants to throw surprise party for Charlie • (1) First, she blocks Charlie in our social messaging app • (2) Then she posts message saying “Surprise party for Charlie tonight!” • (3) Charlie logs in. His client reads the writes from both (1) and (2) in order to figure out which of Alice’s messages to display • Since (2) started after (1) completed, and (3) after (2), it should be impossible for Charlie to see Alice’s new Linearizability Š Fauna, Inc. 2018 8
  • 9. Consensus protocols ensure that events never delivered out of order • So it is impossible for (2) to arrive at a replica without (1) Linearizability and consensus Š Fauna, Inc. 2018 9 Palo Alto Boston London User Blocks Alice Bob Alice Charlie User Message Alice I will be hosting a party tonight Alice What a great party! Alice Surprise party for Charlie at 8PM! User Blocks Alice Bob Alice Charlie User Message Alice I will be hosting a party tonight Alice What a great party! User Blocks Alice Bob Alice Charlie User Message Alice I will be hosting a party tonight Alice What a great party! Alice Surprise party for Charlie at 8PM! (1) (2)
  • 10. Updates happen on different partitions How should we do consensus? But what if data is partitioned? Š Fauna, Inc. 2018 10 Palo Alto Boston London User Message Alice I will be hosting a party tonight Alice What a great party! User Message Alice I will be hosting a party tonight Alice What a great party! User Blocks Alice Bob User Blocks Alice Bob User Message Alice I will be hosting a party tonight Alice What a great party! User Blocks Alice Bob
  • 11. Updates happen on different partitions How should we do consensus? But what if data is partitioned? Š Fauna, Inc. 2018 11 Palo Alto Boston London User Message Alice I will be hosting a party tonight Alice What a great party! User Message Alice I will be hosting a party tonight Alice What a great party! Alice Surprise party for Charlie at 8PM! User Blocks Alice Bob User Blocks Alice Bob User Message Alice I will be hosting a party tonight Alice What a great party! (1) (2) User Blocks Alice Bob Alice Charlie
  • 12. Option 1: Have separate consensus protocols per partition But what if data is partitioned? Š Fauna, Inc. 2018 12 Palo Alto Boston London User Blocks Alice Bob Alice Charlie User Message Alice I will be hosting a party tonight Alice What a great party! Alice Surprise party for Charlie at 8PM! User Blocks Alice Bob Alice Charlie User Blocks Alice Bob Alice Charlie User Message Alice I will be hosting a party tonight Alice What a great party! Alice Surprise party for Charlie at 8PM! User Message Alice I will be hosting a party tonight Alice What a great party! Alice Surprise party for Charlie at 8PM! (1) (2)
  • 13. Option 1: Have separate consensus protocols per partition But what if data is partitioned? Š Fauna, Inc. 2018 13 Palo Alto Boston London User Blocks Alice Bob Alice Charlie User Message Alice I will be hosting a party tonight Alice What a great party! Alice Surprise party for Charlie at 8PM! User Blocks Alice Bob Alice Charlie User Blocks Alice Bob Alice Charlie User Message Alice I will be hosting a party tonight Alice What a great party! Alice Surprise party for Charlie at 8PM! User Message Alice I will be hosting a party tonight Alice What a great party! Alice Surprise party for Charlie at 8PM! (1) (2)
  • 14. But now a delayed message can result in out of order updates • If Charlie’s browser reads from replica in London, his surprise will be ruined! Partitioned consensus Š Fauna, Inc. 2018 14 Palo Alto Boston London User Blocks Alice Bob Alice Charlie User Message Alice I will be hosting a party tonight Alice What a great party! Alice Surprise party for Charlie at 8PM! User Blocks Alice Bob User Blocks Alice Bob Alice Charlie User Message Alice I will be hosting a party tonight Alice What a great party! Alice Surprise party for Charlie at 8PM! User Message Alice I will be hosting a party tonight Alice What a great party! Alice Surprise party for Charlie at 8PM! (1) (2)
  • 15. Another problem: what if (1) and (2) were part of same atomic xact? • Very unlikely that messages for (1) and (2) will get to different nodes on replica at exactly same time • So how do we create a snapshot that doesn’t violate atomicity? Partitioned consensus Š Fauna, Inc. 2018 15 Palo Alto Boston London User Blocks Alice Bob Alice Charlie User Message Alice I will be hosting a party tonight Alice What a great party! Alice Surprise party for Charlie at 8PM! User Blocks Alice Bob Alice Charlie User Blocks Alice Bob Alice Charlie User Message Alice I will be hosting a party tonight Alice What a great party! Alice Surprise party for Charlie at 8PM! User Message Alice I will be hosting a party tonight Alice What a great party! Alice Surprise party for Charlie at 8PM! (1) (2)
  • 16. Give each transaction a timestamp • If transaction A commits before transaction B starts, it must have an earlier timestamp • But how to ensure if A and B are accessing disjoint set of machines? • Use real time! • But then clocks have to be synchronized across machines (within a maximum error bound) To take a snapshot that doesn’t violate atomicity • Choose timestamp • At each machine, read data as of that timestamp • Read last version of each data item written before this timestamp Spanner’s solution Š Fauna, Inc. 2018 16
  • 17. Option 2: Have just one (unified) consensus protocol • Combine atomic transactions ops into one log event But what if data is partitioned? Š Fauna, Inc. 2018 17 Palo Alto Boston London (2)Alice,“SurprisepartyforCharlieat 8PM!” User Blocks Alice Bob Alice Charlie User Message Alice I will be hosting a party tonight Alice What a great party! Alice Surprise party for Charlie at 8PM! User Blocks Alice Bob Alice Charlie User Blocks Alice Bob Alice Charlie User Message Alice I will be hosting a party tonight Alice What a great party! Alice Surprise party for Charlie at 8PM! User Message Alice I will be hosting a party tonight Alice What a great party! Alice Surprise party for Charlie at 8PM! (1) (2)
  • 18. Two huge requirements • Clocks must be synchronized • Hard to accomplish in practice • Google relies on help from hardware --- atomic clocks and GPS • Rumored to have 16 full time engineers helping to maintain synchronization • Correctness of protocol assumes certain knowledge of maximum possible skew • All transactions must wait by size of this maximum before commit • Extremely hard to maintain certain knowledge --- stuff happens! • Assumptions can get violated with sudden clock jumps (e.g. VM migration) Consequences of these requirements • IT staff must devote resources to clock synchronization, or pay cloud provider a premium for this functionality • Application developers must code around possibility of consistency violations that may arise as a result of clock skew jumps • Increases complexity Partitioned Consensus with Spanner Š Fauna, Inc. 2018 18
  • 19. Unified consensus does not require clock synchronization • Reduces IT complexity / costs • No assumptions about maximum synchronization error bound • Reduces complexity for application developer Disadvantage of unified consensus • Can be a scale bottleneck • Batching multiple events in each consensus round can alleviate scale problems • Calvin able to perform consensus on 500,000 transactions a second • Can go higher with hierachitica • Temporary outages during consensus leader election more global (entire system cannot accept writes until new leader elected) • Outage for partitioned consensus only for that partition • But either way, this outage is only for a few seconds • Slightly reduced flexibility in achieving low-latency read-only transactions • Partitioned consensus can have different leaders in different regions Unified consensus (Calvin/FaunaDB) Š Fauna, Inc. 2018 19
  • 20. Deterministic Global Database Consistency Thanks to Daniel Abadi and for contributing research and material. Learn more from this blog post https://fauna.com/blog/faunadb-transaction-protocol
  • 21. Transaction Log and MVCC Storage Š Fauna, Inc. 2018 21
  • 22. Horizontally scalable storage Š Fauna, Inc. 2018 22 Each replica can be sharded into its own number of partitions. Reads use the version for the correct snapshot
  • 23. Replicas in multiple regions Š Fauna, Inc. 2018 23 Single phase commit protocol is uniquely well suited to applications with widely dispersed regions.
  • 24. Deterministic Transaction Protocol Š Fauna, Inc. 2018 24 Different from Google Spanner No atomic clocks Software only Stronger guarantees
  • 25. Deterministic Transaction Protocol Š Fauna, Inc. 2018 25 Use a preprocessor to handle client communications, and create a log of submitted xacts Send log in batched to DBMS Every xact immediately requests all locks it will need (in order of log) If it doesn’t know what it will need • Run enough of the xact to find out, but do not change the database state • Reissue xact to the preprocessor with lock requirements include as parameter • Run enough of the new xact to find out if it locked the correct items (database state might have changed in the meantime) • If so, then xact can proceed as normal • If not, reissue again to the preprocessor and repeat as necessary Trivial to prove this is deterministic and deadlock-free
  • 26. Transaction Protocol Example Š Fauna, Inc. 2018 26 Two customers want to purchase the same item, submit transactions to geographically dispersed replicas
  • 27. Transaction Protocol Example Š Fauna, Inc. 2018 27 Two customers want to purchase the same item, submit transactions to geographically dispersed replicas
  • 28. Coordinators issue reads Š Fauna, Inc. 2018 28 The set of read data is calculated by the coordinator before the transaction is proposed to the log. Some data may be fetched from other hosts in the replica. Snapshot reads make this consistent.
  • 29. Coordinators calculate write effects Š Fauna, Inc. 2018 29 Writes are known locally before the transaction is submitted, and are submitted as part of the transaction.
  • 30. Coordinators submit transactions to the log Š Fauna, Inc. 2018 30 All transactions have a consensus position in the log, determined by a RAFT like protocol.
  • 31. Replicas validate transaction reads Š Fauna, Inc. 2018 31 Transactions are validated before they are applied. Reads that were made on the coordinator, at an earlier snapshot, are rerun at the log’s current snapshot, preserving serializability.
  • 32. Replicas apply transactions Š Fauna, Inc. 2018 32 If the reads are the same, the transaction can commit its buffered writes.
  • 33. Validating a transaction with changed reads Š Fauna, Inc. 2018 33 In this case, re-running the reads gives IN STOCK = 0 instead of 1, which the coordinator was expecting.
  • 34. Abort a transaction when reads don’t match Š Fauna, Inc. 2018 34 This is deterministic, so replicas can decide to abort without coordination. The transaction is retried by the coordinator, and fails with the expected “out of stock” error.
  • 36. Š Fauna, Inc. 2018 44 Strong global data consistency in real-time • Patent-pending single-phase commit provides lowest possible global latency • Transactions are not restricted to data in a single site or shard • Distributed log based algorithm scales throughput with cluster size • Reads are always site-local and transactionally consistent • Global transaction order preserves external cause-and-effect 100% ACID
  • 37. NoSQL, yet Relational • Semi-structured documents that can store any application data model • Real-time indexing system enables querying using multiple models within the same query • Transaction expressiveness is similar to a modern programming language • Query language designed to fit into the current development paradigms • Embedded in application code, similar to LINQ or an ORM • Record-level access control enforces application permissions Unified Multi-Model Data Interactions Read Write FQL API Interface 45Š Fauna, Inc. 2018 Multi-Model Interface
  • 38. Š Fauna, Inc. 2018 46 Operational Simplicity Operational simplicity unlike any other • Setup multi-node, multi-region clusters in minutes • Automatically manages database state to match declared topology • Built-in request routing shields cluster topology from clients • Rich command line interface / API to manipulate nodes and clusters • ACID compliant macro commands drastically reduce risk Elastic DevOps
  • 39. Š Fauna, Inc. 2018 47 Policy-based data isolation and security • All client interactions require an API key by default • Per-record access policy is highly customizable to application needs • End-user credentials management secures data access on per-user basis • QoS: Identity-based allocation of cluster resources • Client/server and server/server network connections encrypted via TLS • Temporal data model builds in auditing capabilities High Security Secure by Design
  • 40. Š Fauna, Inc. 2018 48 Roll out your shared services without risk • Separates developer, schema admin, and cluster management • Allows a single database group to service multiple internal teams • Application teams can be self-service and isolated • Tenant-aware QoS allows for safe mixed workloads • Track who is consuming what and how much (for chargeback) • Policy-based access to shared transactional data Multi-Tenancy Prioritized Requests | Schema Isolation | Seamless Clustering Built-in Multi-tenancy
  • 41. Š Fauna, Inc. 2018 49 Snapshot isolation and configurable data retention • Maintains the evolution of data over time, much like change tracking in documents • Queries can be run against the current time or a snapshot point in time or a composite • Event queries can alert you when new results match specific criteria • Data retention supports intelligent change management, including retroactive event updates to repair data input errors • Extremely useful in use cases such as social activity feeds, recent updates, syncing occasionally connected mobile and IoT devices Temporality Temporality: Track Your Data over Time
  • 42. Š Fauna, Inc. 2018 50 FaunaDB Node Self-contained FaunaDB Node: Single Binary Priority-based Scheduler Fauna ACID Transaction Engine (FATE) Temporal Data Storage Fauna Query Interface Schemaless Docs Relational Indexes Tenant / Role Access Control Replicated Write Ahead Log Cluster Manager
  • 43. Š Fauna, Inc. 2018 52 Future-proofs your data architecture • Limitless horizontal and vertical scale • Infrastructure agnostic, minimal dependencies (jvm) • Easily deploys and performs on commodity hardware • Multi-cloud and hybrid deployment options Designed for Modern Datacenters
  • 44. Š Fauna, Inc. 2018 53 Roadmap Workload Consolidation Search, Graph, Geo HTAP Streaming Data Data Governance Policy-based Control Encrypted Queries Locality Control Datacenter Automation Compute Convergence Automated Recovery Automated Scaling Mission Critical Platform 100% ACID Complete Flexibility Operational Simplicity

Hinweis der Redaktion

  1. Fauna was founded by Matt/Evan based on their experiences at Twitter. We’ve raised almost $30M till date from premier VCs and are based in SF. Every application needs a database. Apps have evolved. Databases haven’t kept pace. We’re building a new database we’re excited to tell you about it. Interesting to note that Google built Spanner and still invested in Fauna.
  2. Fauna was founded by Matt/Evan based on their experiences at Twitter. We’ve raised almost $30M till date from premier VCs and are based in SF. Every application needs a database. Apps have evolved. Databases haven’t kept pace. We’re building a new database we’re excited to tell you about it. Interesting to note that Google built Spanner and still invested in Fauna.
  3. Fauna was founded by Matt/Evan based on their experiences at Twitter. We’ve raised almost $30M till date from premier VCs and are based in SF. Every application needs a database. Apps have evolved. Databases haven’t kept pace. We’re building a new database we’re excited to tell you about it. Interesting to note that Google built Spanner and still invested in Fauna.
  4. Multi-model interface: read and write documents, but query in multiple models such as relational, graph, etc. Distributed ACID transactions: patent pending algorithm ensures ACID in every cluster configuration High security: row-level identity, authentication, and access control protects against application error and transport encryption protects against adversaries [end-to-end encryption coming soon]. Horizontal scalability: dynamically scale from a single machine to multiple datacenters on commodity and cloud infrastructure with no downtime. High availability: redundant, self-healing clustering reacts to machine, datacenter, and network failures in milliseconds with no loss of liveness or durability. Temporality: manage data retention and run queries on historical data at any point-in-time or as change feeds [realtime streaming coming soon]. Multi-tenancy: operate a shared services environment safely with dynamic quality-of-service management and chargeback consumption to LoBs. - Operational simplicity: Rest easy with self-driving cluster management that does what you mean every time with a few strokes of the command line
  5. Any questions thus far? Otherwise, let’s jump into some product details.
  6. Any questions thus far? Otherwise, let’s jump into some product details.
  7. The coordinator executes the transaction code. In most cases, it will not have all of the relevant data locally, and thus will have to read data from nearby servers within the same replica that have the required partitions of data that are involved in the transaction request. It chooses a recent snapshot time (this choice can be arbitrary), and makes requests to the nearby servers to read data as of that snapshot. In our example, let’s assume that the coordinator for each of our two competing transactions chooses to read as of T9 (the most recent transaction in the global transaction log):
  8. The coordinator executes the transaction code. In most cases, it will not have all of the relevant data locally, and thus will have to read data from nearby servers within the same replica that have the required partitions of data that are involved in the transaction request. It chooses a recent snapshot time (this choice can be arbitrary), and makes requests to the nearby servers to read data as of that snapshot. In our example, let’s assume that the coordinator for each of our two competing transactions chooses to read as of T9 (the most recent transaction in the global transaction log):
  9. Nvidia is one of our marquee customers. Their most recent customer-facing applications are based on Fauna, where in it is used for user identity management. They started out with a single site and quickly scaled worldwide to support their explosive user growth. The numbers speak for themselves. The identity service is now in use by multiple consumer facing Nvdia apps. It just works. Most importantly, they run the entire cluster with just one person who is dedicated half time to this role. No outages yet.
  10. About the User Nextdoor is a large social network provider, focusing on neighborhood conversations. Project Overview Nextdoor’s neighborhood organization means municipal and safety services see them as a useful channel for connecting with residents. One of the most heavily used features in Nextdoor app is the ability for these local government services to send broadcast alerts to users in particular areas. However, the queries to compile lists of users based on group membership are complex and were creating performance and operational headaches with their existing Postgres deployment. Similar behavior was also seen in other portions of the Nextdoor app. Therefore, Nextdoor embarked on an effort to create a new “groups subsystem” to offload such queries and minimize impact on the application’s performance. Requirements and Challenges Nextdoor had multiple business and technical requirements driving the shape of the groups subsystem.   Firstly, Nextdoor is seeing a boom the usage of its mobile app. They anticipate traffic to the group subsystem to increase steadily. The subsystem itself is expected to find use in multiple functions in the Nextdoor app. Therefore, the subsystem must be supported by a database that can scale up with the application traffic, without custom hardware or specialized solutions.   Secondly, Nextdoor mobile app serves users distributed globally. As such, they wanted data to be available worldwide, and highly available in multiple regions.   Thirdly, group subsystem queries are IO intensive, including index lookups, nested joins and set intersections. The group membership model is graph-like, with users as members of neighborhoods, but also of other groups. Neighborhoods are part of larger groups, which can also be nested into regions. Nextdoor required a database with support for complex queries.   Fourthly, Nextdoor is built in the Cloud. They wanted to adopt a database backed that would operate in the cloud as well, thereby minimizing administrative and operational overheads associated with running their application.    Lastly, various teams had been migrating workloads from RDBMS to NoSQL for almost a decade, to take advantage of the scalability of NoSQL systems. What remained were the workloads that require relational features like joins and ACID transactions, leaving Nextdoor with a hodgepodge of Postgres and NoSQL databases. Nextdoor saw the group subsystems effort as an opportunity for consolidating workloads to lower their total cost of ownership. Why Fauna FaunaDB gave Nextdoor the general purpose platform they needed for running mission critical workloads in cloud-native environments.   Unlike Postgres, FaunaDB was designed from the ground up as a cloud-native and horizontally scalable database. It delivers the same set of data management capabilities, no matter the data distribution topology. Most importantly, it does so without sacrificing relational features desired by Nextdoor.   Robust multi-region replication with strong consistency means that data committed to FaunaDB is available across all regions, so data is correct and complete even in the face of disasters. This gave Nextdoor the horizontal scalability they require.   FaunaDB features a multi-model interface that includes relational primitives such as ACID transactions, consistent indexes, joins, as well as document- and graph-styled querying, all stored with configurable temporal snapshot retention. Nextdoor’s groups subsystem queries include nested joins and set intersections -- a perfect fit for FaunaDB’s expressive query language.   In FaunaDB, Nextdoor a data platform designed to grow with the business, not just a scalable transaction engine with powerful queries. The full suite of platform features include multi-tenancy and object level security mean Nextdoor can expand their FaunaDB installation to support more applications and use cases. Results By choosing FaunaDB for the group subsystem, Nextdoor was able to isolate the workload so that group queries do not contend with other application traffic. FaunaDB’s query language allows them to express complex queries and compose queries programmatically. This flexibility means Nextdoor can expand the use cases for targeted content, while also exploring more ways to use FaunaDB. Because a single FaunaDB cluster is designed to support multi-tenancy, they can easily add new workloads while continuing to grow the groups subsystem.
  11. I just added this use case as it relates to what we talked about earlier with the evolution of business application platforms and the latest, voice apps. VoiceConnect is a new company that is creating cool applications for Amazon’s Alexa platform. They wanted to use Amazon AWS and in particular Amazon Lambda to create a serverless architecture
  12. Any questions thus far? Otherwise, let’s jump into some product details.
  13. Fauna’s transactions are key to its correctness and productivity benefits. We have built a cutting-edge system designed to deliver fully ACID-compliant transactions with as few tradeoffs as possible. It completely eliminates restrictions other systems must place on transaction functionality, such as limiting transactions to a single record or a single shard. The way this works is that a Fauna cluster internally manages a distributed write ahead log which all transactions are written to. The log’s throughput scales with the size of the cluster, which eliminates any sort of capped transaction throughput that other systems suffer from. The log has the important job of ordering all write transactions with respect to each other. This provides the ACID property of strict serializability. Once transactions are written to the log, each node can then independently play through its set of transactions based on the data it owns. One other goal we achieved was to reduce transaction latency to the minimum possible. In a global environment, network round-trips are very costly. Every other system based on two-phased commit (such as spanner or cockroachdb) requires at least two global round trips of communication, but write transactions in Fauna require only one. Furthermore, this design gives you consistent, fast, locally served reads.
  14. As you saw in the clustering sequence, we’ve worked hard to make Fauna the simplest possible database to operate and scale. You can literally setup a 5 node cluster replicated across 5 regions within minutes. Commands are coarse grained and easily integrated into your devops workflow/automation. The build illustrates the simplicity – add a node to an existing cluster and the system does the rest
  15. Unlike MongoDB, Cassandra, YugaByte: FaunaDB secures client access by default (it seems like only SQL systems and DBaaS actually do this). Fauna offers Fine grained per-record access control policy (Oracle, Firebase, Postgres w/ an extension do this). Unique to Fauna: end-user credentials management and access control. Temporal data model enables detailed auditing – you can see how your data has evolved within a time line. Also unique to Fauna is the QoS tied into security model. It ensures that a single client cannot take over your cluster. We will introduce end to end encryption soon, and that will create the more comprehensive security capabilities in the market.
  16. Fauna’s multitenancy support is designed to solve two problems, which are really two sides of the same coin: Different teams within an organization cannot share hardware resource due to the lack of performance isolation, leads to inefficient hardware utilization in support of a data silo per team Shared systems are extremely sensitive changes in workload, which requires strict control over who has access to transactional data. It’s easy for a prototype or an analytics job to take a production system offline. Fauna solves both of these problems by letting operators allocate a finite amount of cluster resources to a given team or application. You can have a higher leverage ops team managing fewer clusters (self-service dev-ops) You can provide wider access to real-time transactional datasets No downtime is required to onboard or manage tenants in a cluster. It all just works. (That is the theme here.)
  17. Fauna features built—in temporality. Each write is an update, instead of an overwrite. This enables change tracking for all data based on your retention policies. Temporality enables new use cases such as fine grained auditing of data, social activity feeds, and edge computing scenarios with occasionally connected devices.
  18. Quick over view of a Fauna node. Unlike other databases, faunadb has a self contained node with all the core services services built in. You deploy a node to get started. And you add more nodes to scale. They work in a peer-to-peer fashion for scale and availability. There are no additional pieces to install. More about that in a bit. Few things to point out: The query interface is built to integrate very easily into modern programming patterns. As we noted, combines documents with relational indexing to give you a structure that significantly simplifies your data model Each Fauna client has a unique identifier. The identifier is associated with policy that determines level of access as well as tenant priority for QoS Queries flow to a scheduler, that determines which workloads to prioritize based on the QoS settings for that client. FATE is our secret sauce. Based on a patent pending technology, it processes strongly consistent ACID transactions using a distributed write ahead log. You scale out the log for greater throughput. We can white board the details in a follow on conversation if there is interest. Much to be discuss here. The cluster manager takes care all the replication, and management of nodes. It is highly optimized for performance and minimal chatter.
  19. To summarize, FaunaDB—real customers, real production deployments