Rivet Actors: Community Discusses Alternative to Durable Objects with Built-in State Management

BigGo Editorial Team
Rivet Actors: Community Discusses Alternative to Durable Objects with Built-in State Management

The tech community is actively discussing Rivet Actors, a new system that brings actor-model programming to mainstream developers, with particular interest in its comparison to Cloudflare's Durable Objects and traditional actor systems like Erlang.

Architecture and State Management

Rivet Actors implements a sophisticated state management system powered by FoundationDB, offering automatic state persistence after RPC calls. The system provides developers with a simplified approach to handling state through a _state property, allowing straightforward JavaScript operations without explicit state management code. This implementation has sparked discussions about consistency guarantees and transaction handling across actor communications.

If you're using the KV API directly, this is correct. Actors also have a this._state property, which is automatically written to FDB after each RPC call if modified. This allows developers to rapidly prototype by writing vanilla JS code like this._state.count += 1 without having to worry about writing state and its associated edge cases.

Use Cases and Performance

Community members have highlighted several practical applications for Rivet Actors, particularly in scenarios requiring high contention and strong consistency. These include collaborative document editing, local-first applications with CRDT sync, stateful multiplayer games, and chat systems. A notable aspect discussed is the system's ability to automatically scale down to zero when unused, addressing concerns about operational costs that have plagued similar systems like Improbable's metaverse backend.

Showcasing Rivet Actors' GitHub repository highlights collaborative capabilities in real-time applications
Showcasing Rivet Actors' GitHub repository highlights collaborative capabilities in real-time applications

Developer Experience and Language Support

A significant point of discussion centers around Rivet's approach to making actor-model programming more accessible to mainstream developers. While some community members point out that similar functionality exists in Erlang/Elixir, others appreciate Rivet's focus on supporting mainstream languages like TypeScript. This has sparked a broader conversation about the trade-offs between traditional actor systems and modern implementations.

Technical Evolution

Since its previous discussion on Hacker News in 2023, Rivet has undergone significant changes, including a complete rewrite of their orchestration layer, the launch of the isolate runtime, and improvements to self-hosting capabilities. The community has shown particular interest in these developments, especially the replacement of traditional orchestration tools like Nomad with an in-house workflow engine.

The discussions reveal a growing interest in actor-model systems that can bridge the gap between traditional distributed computing paradigms and modern development needs, while maintaining reasonable operational costs and developer accessibility.

Reference: Rivet: Run and scale real-time applications with Rivet Actors