Fauna Blog

Turn your data into an API with FaunaDB and GraphQL

GraphQL is a query language for APIs that abstracts multiple data sources and enables app developers to request data in the format they need, without requiring backend API changes. Because GraphQL decouples front- and backend, it can consolidate multiple APIs into a single endpoint.

GraphQL’s combination of expressiveness, performance, and flexibility has made it a runaway hit with developers, who find it more efficient than REST for many common use cases, and a natural fit for composing microservice calls.

In this post, I’ll create a GraphQL resolver using FaunaDB for a schema of posts, authors, and comments to support a blog engine. It’s ported from an original example for the Serverless Framework.

Read More

What makes FaunaDB the ideal database for serverless applications?

FaunaDB Serverless Cloud is the first database designed expressly to support serverless application development. This InfoQ article explores how FaunaDB empowers developers who’ve struggled to reconcile database infrastructure with modern development practices, like microservices, continuous delivery, and serverless.

FaunaDB Serverless Cloud provides an array of features that allow developers to securely build and run serverless applications without configuring or operating infrastructure. This has opened the door for a broad range of use cases - from mapping social networks, to incorporating change feeds into apps, to implementing heavy-duty financial applications that need ledgers and global distribution.

Read More

The best database for SpatialOS

We’ve gotten some inquiries from customers about using FaunaDB with SpatialOS. FaunaDB’s global distribution, transactions, and temporal data model make it a great fit; I would like to explain why in detail.

What is SpatialOS?

SpatialOS is a cloud platform for building multi-agent systems: primarily online games, VR worlds, and physical simulations.

The game Worlds Adrift

Data elements called entities are sharded and replicated in memory across machines that can host co-located workers. Workers are stateless logic processors that can be written in a variety of programming languages. They subscribe to change events on entities, or respond to user input, and react by executing logic, querying external resources, and updating other entities.

In academia, they call this a tuple space. In game development they call it a big problem, so it makes sense that SpatialOS has attracted so much attention.

Read More

Global multi-cloud replication in FaunaDB Serverless Cloud

FaunaDB Serverless Cloud is a multi-master, globally distributed database as a service. Other cloud databases offer single-master configurations with global replication, or multi-master configurations with continental replication, but only FaunaDB truly supports low latency read and write access from anywhere.

But where does your FaunaDB Serverless Cloud data actually live? We’re very excited to show you with the new cloud status page.

Locations and infrastructure providers

Read More

Why I joined the next big database startup and you should too

I’ve been with Fauna since November 2016 and in the database industry for a decade. I rode the first wave of NoSQL and built systems that power your everyday shopping, airline and hotel bookings, online gaming, viral media, medical records, wind farms and factory automation.

Since those heady days, the NoSQL movement has matured. Everyone is onboard, from CIOs at the Fortune 100 to highschool hackers. The previous generation’s skepticism about leaving SQL behind is gone, replaced with real energy and a focus on practical solutions to business and operational problems. In the early days, even cutting edge adopters were full of questions. Today, people know what they need from a database.

Read More

Three months of civic engagement

In February, along with several other startups, we announced our new civic engagement policy.

The policy was inspired by the outpouring of political action after the presidential inauguration. But it was a natural extension of our existing family, diversity, and community focus, and reflected staff engagement that was already happening. It’s been about three months now and we are excited to share how the policy has empowered our team.

Read More

Spanner vs. Calvin: distributed consistency at scale

Daniel J. Abadi is an Associate Professor at Yale University. He does research primarily in database system architecture and implementation. He received a Ph.D. from MIT and a M.Phil from Cambridge.


In 2012, two research papers were published that described the design of geographically replicated, consistent, ACID compliant, transactional database systems. Both papers criticized the proliferation of NoSQL database systems that compromise replication consistency and transactional support, and argue that it is possible to build extremely scalable, geographically-replicated systems without giving up consistency and transactional support.

It is possible to build extremely scalable, geographically-replicated systems without giving up consistency and transactional support.

The first of these papers was the Calvin paper, published in SIGMOD 2012. A few months later, Google published their Spanner paper in OSDI 2012. Both of these papers have been cited many hundreds of times and have influenced the design of several modern “NewSQL” systems, including FaunaDB.

Recently, Google released a beta version of their Spanner implementation, available to customers who use Google Cloud Platform. This development has excited many users seeking to build on Google’s cloud, since they now have a reliably scalable and consistent transactional database system to use as a foundation.

However, the availability of Spanner outside of Google has also brought it more scrutiny: what are its technical advantages, and what are its costs? Even though it has been five years since the Calvin paper was published, it is only now that the database community is asking me to directly compare and contrast the technical designs of Calvin and Spanner.

Read More

Dive into FaunaDB with our technical white paper

How do you build a database like FaunaDB?

Since our serverless cloud launch a few weeks ago, the community has been asking for deep technical insight into how FaunaDB is designed and implemented. A comment by mdasen on Hacker News summed it up:

“They seem to understand more than their marketing lets on.”

We are happy to release the first draft of our technical white paper in response. Download it here.

The paper explains the foundations of FaunaDB and the motivations for creating an adaptive operational database.

Read More