What is Fauna?

Fauna is the data API for client-serverless applications. A web-native GraphQL interface, with support for custom business logic and integration with the serverless ecosystem, enables developers to simplify code and ship faster. The underlying globally-distributed storage and compute fabric is fast, consistent, and reliable, with a modern security infrastructure. Fauna is easy to get started with and offers a 100 percent serverless experience with nothing to manage.

Fauna transforms the traditional DBMS into a Data API that gives you all of the capabilities of an old-guard database, without sacrificing flexibility, scale, and performance. Fauna core functions are inspired by Calvin: a clock-less, strictly-serializable transactional protocol for multi-region environments.

Highlights include:

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

  • Multiple APIs for data access, including native GraphQL and a DSL-like functional query language, for more productive development.

  • Strong data consistency with isolation levels ranging from snapshot to strict serializability.

  • Built-in auth and key-based security, on by default, that prevents inadvertent data leaks.

  • Built-in multi-tenancy with dynamic QoS.

  • Change data capture, with data temporality, that allows you to track the evolution of your data.

Fauna operates as a multi-cloud database service that spans AWS and GCP, across global regions for added reliability and redundancy.

What does the modern database look like?

The answer to the above question differs depending on who you ask:

Operations
Developers

  • Simple to get started with capabilities that modern applications need.

  • Freedom from operating infrastructure such as servers and containers.

  • Keeps data safe and secure without additional middleware.

  • Low-latency access, free from cold starts.

App Architecture
App Architects

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

  • Models a variety of business data.

  • Scales dynamically to global workloads.

Business
Businesses

  • Usage-based pricing and adoption path.

  • Reliable and cloud-agnostic.

Fauna checks all these boxes and offers more.

How does Fauna address these requirements?

Fauna 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 Fauna, do not rely on physical clock synchronization to maintain consistency. Fauna 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. Fauna 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 benefits in different use cases:

Calvin capability Benefit Use Case Examples

Strictly serializable, multi-region transactions.

Provides a consistent, unified, and global view of all data in real time.

Global backend for operational SaaS or mobile apps.

Single round consensus for writes.

Lower write latency that is not impacted by multiple round trips across different regions.

Transactional mobile and payment apps where a snappy user experience matters.

Write serializability independent of the number of keys.

Unlike some of our competitors, Fauna 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.

Games or business 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.

Location-based mobile apps that require low-latency, consistent reads, irrespective of geography.

No contention between serializable writes and reads.

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

Real-time business apps that feature consolidation of data across the globe.

Architectural innovations at every layer

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

Data model

Fauna 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 Fauna 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

Fauna offers polyglot APIs that includes native GraphQL capabilities, as well as a proprietary, functional query language (called FQL) for advanced tasks. Interaction with the database is mediated by drivers that publish embedded DSLs for popular application languages. Developers using Fauna 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 Fauna to implement a master-less architecture. With replicas in a cluster, geographically distributed across many locations, Fauna 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.

Fauna 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.

Next steps

Now that you know something about what Fauna is about, you should sign up for a free account and take Fauna for a spin! See the Dashboard quick start for details.

There is much more to learn about Fauna:

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!