Fauna Transactional Database Introduces Event Streaming

Fauna, the company behind the Fauna transactional database, recently announced the general availability of Event Streaming, a push stream that sends document and collection level changes to subscribed customers.

Shashank Golla, Senior Product Marketing Manager at Fauna, explains:

Fauna Event Streaming uses an open, push-based streaming method to automatically deliver real-time data updates to your customers when there is a change in your database. Unlike polling, in streaming, subscribing on the client side happens only once and changes are automatically streamed to the client each time the subscribed document or collection is updated.

Source: https://fauna.com/blog/event-streaming#ensure-clients-have-least-privilege-access-with-abac

Fauna supports two types of event streams: document stream, where the client subscribes to a document reference, and set stream, where the client subscribes to a set reference and when one or more documents enter or leave the set, an event notification is triggered.

A distributed database, Fauna is a globally replicated object-relational service that supports an indexed document data model and distributed ACID transactions. A subscription is a connection to the cloud service that is kept open by the customer through the Fauna driver and both assembly and document delivery functionality is available using the C#, Go, JavaScript, JVM (Java, Scala) drivers and Python. Explaining how to integrate event streaming using a sample react app, Fauna Developer Advocate Shadid Haque suggests:

Avoid running a query to retrieve a document and then establishing a stream. Multiple events may have modified the document before the stream started, which may cause the document’s data to be inaccurately represented in your application.

Event streaming databases have become popular in recent years, and major cloud providers offer various managed options for streaming data, including DynamoDB Streams and AWS Kinesis Datastream, Datastream on Google Cloud, and Azure Event Hubs. CockroachDB and Astra DB support event-driven architectures using Change Data Capture (CDC). Jeremy DalyGM of the serverless cloud at Serverless Inc, comments in his latest newsletter:

If you’re a database vendor and aren’t drifting into the world of event-driven architecture, you might as well start looking for something else to do.

To ensure customers have least privilege access, Golia suggests using ABAC, Fauna’s extension of traditional role-based access control:

With ABAC, you can implement least-privilege access using streaming and deliver real-time changes only to users who need to receive updates.

The following limitations apply to Fauna event streaming: GraphQL subscriptions are not currently supported, a browser can open a maximum of 100 streams, and a document stream only reports events for fields and values of the document data field.

Event streaming is billed based on usage and is available in all Fauna price plans. Each streamed event has two read operations and includes 4,000 bytes read from storage, plus one read operation for every additional 4,000 bytes, per subscriber. One compute operation per subscriber is counted for every second a stream is held open.

Maria H. Underwood