🚀 Fauna Architectural Overview White Paper: Learn how Fauna's database engine scales with zero ops required
Download free ->
Fauna logo
FeaturesPricing
Learn
Customers
Company
Support
Log InContact usStart for free
Fauna logo
FeaturesPricing
Customers
Start for free
© 2024 Fauna, Inc. All Rights Reserved.
<- Back
event streaming 2

Introducing Fauna's New Event Streaming

Wyatt Wenzel & Bryan Reinero |May 21st, 2024|

Categories:

FeaturesNews

Introducing Fauna's New Event Streaming

We are excited to announce the general availability (GA) of our new event streaming capabilities. These features significantly enhance the level of flexibility, control, and power developers can experience with event streaming, making it simpler for development teams to build dynamic, interactive applications that incorporate both real-time push updates and on-demand pull requests. Whether you're developing a SaaS application, multiplayer game, a live chat application, or an e-commerce platform, event streaming ensures your application stays in sync with the latest data changes without the overhead of constant polling, while also offering the ability to ingest pull-based updates for timely data retrieval on demand.

What's New with Fauna's Event Streaming?

Broad and Targeted Notifications

With the new update, developers can choose to receive an entire document as part of an event notification, or use projection to only receive updates on specified fields. This means you can tailor the stream to fit your application's needs perfectly, whether it's tracking inventory levels, user interactions, or any other dynamic data aspect.

Advanced Query-Based Streams

Fauna's event streaming now supports defining streams based on FQL (Fauna Query Language) v10 queries, offering developers granular control over the data they monitor. This feature allows for the creation of highly specific streams that can filter changes based on collection, document attributes, or even specific document fields, enabling precise control over the stream's scope. Whether your application's architecture demands comprehensive oversight or focused alerts, Fauna provides the tools to configure your data streams exactly as needed.

Snapshot on Stream Start

Upon initiating a stream, Fauna provides the capability to get a snapshot of the documents at the moment the stream is started. This feature is invaluable for applications that require an initial state before listening for incremental updates, such as loading the initial dataset for a UI component before applying real-time changes.

Projection: Tailored Data Delivery

Projection within streams has been designed to ensure that only relevant data is communicated, reducing bandwidth and simplifying client-side data processing. This efficiency is paramount for high-performance applications that rely on swift updates and minimal overhead.

Optimized Performance with Indexes

To complement the flexibility of svent streaming, we've ensured that performance and efficiency are at the forefront. By leveraging indexes with event streams, queries are executed swiftly, reducing latency, and optimizing resource consumption. This results in a smoother experience for end-users and cost-effectiveness for your applications.

Coming Soon: Change Data Capture with Event Feeds and Snapshot Exports

Complementing Fauna’s existing event streaming capabilities, event feeds and notifications will enhance both real-time and historical data processing. By enabling both push and pull updates, Fauna offers flexibility in how you handle event-driven data, making it easier than ever to maintain accurate and timely information across your applications.

Event feeds allow you to query changes (create, update, delete) in a database container, letting applications process data at their own pace through a queryable, persistent history of changes. Applications can consume this change data incrementally, giving them more control over the rate at which they process these changes. This is ideal for synchronizing large datasets with a data warehouse or maintaining audit logs.

Notifications enable development teams to export complete, transactionally consistent snapshots of your database. These notifications can be used to seed analytics platforms, vector databases, and search engines, providing a comprehensive view of your data at any point in time. Encrypted and compressed, these snapshots ensure that your data is secure and manageable.

Event Streaming Use Cases: Elevate Your Real-Time Applications with Fauna

Combined with Fauna's distributed transaction engine that delivers automatic global distribution and a fully serverless + API delivery model, event streaming allows developers to build highly scalable real-time applications without worrying about infrastructure. Event streaming integrates seamlessly with serverless functions and other microservices, enabling efficient, event-driven architectures that automatically scale with your application's needs.

Some of the use cases for event streaming include:

Maintaining Live Application State

Many applications mandate real-time updates to ensure that the application's UI reflects the current state of the backend without manual refreshes – critical for dynamic environments where data changes frequently and needs to be immediately visible to users. Examples include inventory updates in eCommerce/Retail applications, leaderboard updates in multiplayer gaming, or real-time analytics and dashboards in SaaS apps.

Collaborative Applications

Event Streaming facilitates direct communication between various parties through shared documents or data collections. Examples include real-time messaging in chat applications or real-time updates in document editing, chat applications, social apps, or project management tools.

Event-Driven Applications

Event Streaming allows components of an architecture to subscribe to specific events or data changes and react accordingly, without needing to know the source of the changes. This is useful for event-driven architectures, where microservices subscribe to relevant events from other services to trigger workflows or updates.

Business Outcomes with Event Streaming

Real-Time Data Synchronization Across Services

Fauna's event streaming enhancements enable seamless real-time data synchronization across distributed services and applications. This ensures that all parts of an application ecosystem can react instantly to changes, leading to a more cohesive user experience and timely data analytics.

Improved Scalability and Performance

By allowing applications to subscribe to specific changes in the database, Fauna's event streaming reduces the need for polling and excessive data transfer. This efficiency lowers the application's bandwidth and computational overhead, enabling it to scale more effectively and perform faster under high loads.

Enhanced Developer Productivity

The ability to define streams using Fauna Query Language (FQL) queries and receive notifications for only relevant changes simplifies the complexity of building reactive applications. Developers can focus more on creating value-added features rather than managing the intricacies of real-time data management, speeding up development cycles and reducing time to market.

Getting Started with Event Streaming

Ready to get started? Check out the event streaming documentation for a step-by-step guide, join our Discord community for support, and sign up for an account today!

If you enjoyed our blog, and want to work on systems and challenges related to globally distributed systems, and serverless databases, Fauna is hiring

Share this post

TwitterLinkedIn

Subscribe to Fauna's newsletter

Get latest blog posts, development tips & tricks, and latest learning material delivered right to your inbox.

<- Back