What is FaunaDB?

FaunaDB is a distributed operational (OLTP) database for modern cloud and container-centric environments. It is the world’s first commercial database that is inspired by Calvin, a strictly serializable transaction protocol for multi-region environments. FaunaDB was built to address technology requirements from modern digital businesses and is influenced by the database research community. With a design focus on quick deployment, simplicity of daily operations, and developer’s ease of use, FaunaDB is a truly unique database for deploying modern applications.

Highlights include:

  • Masterless, multi-cloud, multi-region, active-active clustering architecture.

  • From snapshots to strictly-serializable transactions, FaunaDB’s multiple consistency levels don’t break with clock skew.

  • Multiple models to manipulate your data (relational, document, graph).

  • A DSL-like, composable query language that allows for better and faster development.

  • Key-based security, on by default, that prevents inadvertent data leaks

  • New capabilities such as temporality, multi-tenancy, and dynamic QoS

FaunaDB is available as a fully-managed, serverless, cloud service that spans AWS and GCP.

If you’re eager to get started with FaunaDB, see our Quick start with Fauna Cloud guide.

What does the modern database look like?

The answer to the above question differs depending on who you ask. But all database administrators are looking for a single solution to their problems.

Operations
Operations

  • Delivers mainframe-class reliability without special hardware or networks.

  • Keeps data safe and secure.

  • Simple to deploy and operate.

App Architecture
App Architecture

  • Guarantees data correctness at all times, across all cloud regions.

  • Models a variety of business data.

  • Scales dynamically to global workloads.

Business
Business

  • Usage-based pricing and adoption path.

  • Cloud-agnostic, multi-cloud, hybrid.

FaunaDB checks all these boxes and offers more.

How does FaunaDB address these requirements?

FaunaDB is the world’s first Calvin-inspired database system. The Calvin paper, was published at Yale University in 2012 by Dr. Daniel Abadi and his team of researchers, Thomson, Ren, Diamond et. al.

Calvin is a practical transaction scheduling and data replication layer that uses a deterministic ordering guarantee to significantly reduce the normally-prohibitive contention costs associated with distributed transactions. Unlike previous deterministic database system prototypes, Calvin supports disk-based storage, scales near-linearly on a cluster of commodity machines, and has no single point of failure. By replicating transaction inputs rather than effects, Calvin is also able to support multiple consistency levels—including Paxos-based strong consistency across geographically-distant replicas—at no cost to transactional throughput.

Unlike other distributed transaction protocols like Spanner and Percolator, Calvin, and FaunaDB, do not rely on physical clock synchronization to maintain consistency. FaunaDB also places no constraints on replica distance, and is practical to deploy at global internet latencies.

What does this mean for a database? Calvin offers the best approach for architecting a distributed transaction engine that operates in highly distributed and unreliable environments such as the Cloud. FaunaDB delivers strong consistency, at scale, across regions, without suffering from issues related to clocks or distance, and does so without requiring specialized hardware, software, or networks to operate your database.

Calvin’s clockless transaction ordering provides several technical benefits that translate to unique business benefits in different industry verticals:

Calvin capability Business Benefit Industry Verticals Benefited

Strictly serializable, multi-region transactions.

Provides a consistent, unified, and global view of all transactions in real time. Transactions can be reconciled in real time.

Ledger apps in Fintech: provides mainframe-like reliability in the cloud.

Single round consensus for writes.

Write latency is not impacted by multiple round trips across different regions.

E-commerce: faster transactions lead to better control of inventory. Overselling due to eventual consistency in the 1st generation of NoSQL databases is no longer a problem

Write serializability independent of the number of keys

Unlike some of our competitors, FaunaDB does not have any restrictions on the number of keys that can be part of a transaction. There is no need to artificially split transactions into multiple batches of keys.

Billing, Call Centers: Ensures a better user experience in applications where a transaction can impact multiple keys.

Serializable reads can be serviced by any replica

Reads can be serviced by any region. Results in real-time visibility that provides an accurate view to the end user

Gaming apps: low-latency local reads are consistent

No contention between serializable writes and reads

Leads to lower latency writes and a consistent view of data across the globe

Fintech, CRM: real-time consolidation of data across the globe

Architectural innovations at every layer

While Calvin is at the heart of FaunaDB’s transaction protocol, there are innovations in other important components of the database as well.

Data model

FaunaDB implements a semi-structured, schema-free, object-relational data model, a strict superset of the relational, document, object-oriented, and graph paradigms. The data model allows enforcing constraints, creating indexes, and joining across multiple document entities. Objects within FaunaDB can be visualized as the following hierarchy.

  • Records are inserted as semi-structured documents, which can include recursively-nested objects and arrays, as well as scalar types.

  • Documents are grouped into collections, which are similar to tables in relational databases.

  • Collections are further grouped into databases. Like file system directories, databases can recursively contain other databases.

Derived relations are built with indexes. An index is a transformation of a set of input instances into one or more result sets composed of terms and values. Indexes are expressed as partially-applied queries and can transform, cover, order their inputs, and enforce constraints.

Query interface

In order to conform to modern development practices, FaunaDB implements a new query language that is intuitive, flexible, and type-safe. Interaction with the database is mediated by drivers that publish embedded DSLs for popular application languages. Developers using FaunaDB write application-native code in a familiar style, within a transaction context. A single request can encapsulate a transaction that spans multiple records.

Clustering

The use of Calvin also allows FaunaDB to implement a master-less architecture. With replicas in a cluster, geographically distributed across many locations, FaunaDB provides Active-Active transactions that allow applications to scale horizontally across the globe without a single line of code.

Security

Most databases implement schema-level user authentication only, since they were designed for small numbers of internal business users. But modern applications are exposed to millions of untrusted and potentially malicious actors, and must implement identity management, authentication, and row-level security, at a minimum.

FaunaDB internalizes these concerns and provides both administrative and application-level identity and security, either through API servers, or directly to untrusted clients like mobile, browser, and embedded applications.

Use cases

FaunaDB is a transactional database that can be used to address a wide variety of enterprise use cases. Here is a sample of different use cases where FaunaDB is a good fit:

Distributed Ledgers
Distributed Ledgers

Mobile Apps
Mobile Apps

DBaaS/Shared Services
DBaaS/​Shared Services

SaaS Applications
SaaS Applications

Mainframe Migration
Mainframe Migration

Identity Management
Identity Management

Retail/E-commerce
Retail/​E-commerce

Global Scalability
Global Scalability

Was this article helpful?

We're sorry to hear that.
Tell us how we can improve! documentation@fauna.com

Thank you for your feedback!