An Introduction to FaunaDB

Chris Biscardi
InstructorChris Biscardi
Share this video with your friends

Social Share Links

Send Tweet
Published 5 years ago
Updated 4 years ago

FaunaDB is a Calvin inspired hosted database marketed towards JAMStack and serverless users. It is geo-replicated across multiple providers (AWS, GCP, and soon Azure), uses a lambda calculus based query language (FQL) or the built-in GraphQL support, and is quick to get started with. Don't worry about the vocabulary here (Consistency, lambda calculus, etc), FaunaDB can be quickly put to work without reading any papers and without knowing what lambda calculus is.

Instructor: [00:00] Fauna is billed as a globally distributed, serverless cloud database management system for modern applications like those in the JAMstack. What this means is that FaunaDB is a document store with a Lambda calculus-based query language called FQL and native GraphQL support.

[00:17] It is similar to Spanner and inspired by Calvin, both of which have papers written about them that have been cited hundreds of times. However, if words like lambda calculus and reading papers aren't your jam, don't worry. Getting started is easier than it sounds. You won't have to read the papers or take a course in lambda calculus to put FaunaDB to work quickly.

[00:36] Practically, what this means is that you can quickly spin up a new database, offload operations to the Fauna team, describe databases using the built-in GraphQL support, and access your data from anywhere around the world quickly without sacrificing correctness constraints.

[00:52] FaunaDB is multi-tenant by default, which means it supports nested databases. It operates as a multi-cloud service that crosses providers like AWS and GCP in multiple global regions. All of this is done for you without having to give up transactions. You can use FaunaDB from an array of popular languages such as JavaScript or Go.

[01:14] Fauna internalizes security in a way that some other databases do not, including intentional support for multi-tenant SaaS services. This support includes different token access levels like read-only, as well as access control lists, or ACLs, that are flexible enough to implement role-based access control, or RBAC, on the document level.

[01:36] If you're interested in the deeper correctness constraints offered by FaunaDB, take a look at the Jepsen analysis. If you haven't seen a Jepsen analysis before, note that one of the best outcomes is that the analysis finds issues and the company or project acknowledges and solves them.

[01:51] Depending on how you use FaunaDB, you can achieve snapshot isolation levels of serializability or strictly serializable. That puts FaunaDB somewhere between snapshot isolation and strictly serializable on this consistency chart.

[02:05] If you're unfamiliar with consistency models, this matters because snapshot isolation guarantees order within a transaction but not across transactions, as the sub-operations may interleave with each other. Strictly serializable systems enforce a total order on the transactions in the system.

[02:22] In contrast, weaker consistency models, like read uncommitted, allow one process -- we'll call it A -- to write a record to the database. When process B tries to read the same record, the value process B gets isn't guaranteed to be the original or modified value, and thus, as you can imagine, can easily source bugs.

egghead
egghead
~ 36 seconds ago

Member comments are a way for members to communicate, interact, and ask questions about a lesson.

The instructor or someone from the community might respond to your question Here are a few basic guidelines to commenting on egghead.io

Be on-Topic

Comments are for discussing a lesson. If you're having a general issue with the website functionality, please contact us at support@egghead.io.

Avoid meta-discussion

  • This was great!
  • This was horrible!
  • I didn't like this because it didn't match my skill level.
  • +1 It will likely be deleted as spam.

Code Problems?

Should be accompanied by code! Codesandbox or Stackblitz provide a way to share code and discuss it in context

Details and Context

Vague question? Vague answer. Any details and context you can provide will lure more interesting answers!

Markdown supported.
Become a member to join the discussionEnroll Today