All nodes in a FaunaDB cluster run the same Java JAR, with administrator control over log and data replication topology. Queries can be serviced by any node in the cluster, which acts as the coordinator for the query. Queries run as isolated ACID transactions, and can include precondition checks and dependent queries. Transactions are processed using the Calvin protocol which is optimized for multi-region deployments.
Relational Key/Value Document / XML Graph
FaunaDB is an indexed document store that allows access to the stored data using multiple models - relational, document, graph and key-value.
FaunaDB’s indexes are similar to views, in that they materialize covered fields from the source class, which are returned as part of the index query result. Similar to materialized views, access control rules can enforce that particular indexes can only be read by client keys with specific roles.
Serializable Snapshot Isolation Cursor Stability
Read-write transactions using serialized indexes run with strict-serializability. Read-only transactions and index reads from non-serialized indexes will see snapshot isolation. Clients can upgrade to strict-serializability across all operations.
Multi-version Concurrency Control (MVCC)
FaunaDB’s distributed transaction log is processed deterministically and non-conflicting transactions are retired to multi-version concurrency control storage (MVCC) with configurable data retention. Queries can access the previous versions of documents and indexes by supplying a timestamp, and even compare subqueries across timestamps. With elevated privileges, queries can modify past snapshots, because sometimes it’s better to fix a mistake than issue compensating transactions.
FaunaDB indexes are accessed via term and paginated by value, enabling developers to optimize data locality as applications scale. Queries can use joins and other set operations to combine indexes, as well as iterate over rows to load documents or run dependent queries. By default, indexes work with snapshot isolation, but they can be configured for serialized isolation.