Durable Actors is an open-source runtime that implements durable objects/actors as stateful serverless functions, positioned as an alternative to Cloudflare Durable Objects without vendor lock-in, memory limits, and with built-in observability. It targets real-time applications such as chat systems, collaborative documents, and agent swarms by providing durable state (data that survives crashes and restarts) and serialized execution (concurrent callers update state safely). The project supplies TypeScript and Python SDKs, automatic type-safe client generation, local developer tooling, and an option to self-host the runtime on GCP.
The implementation models actors as classes with persisted fields (marked @Persisted) and concurrency controls (e.g., @Interleave to let other calls run during awaits). A ChatHistory example shows how actors persist messages, stream LLM replies using an OpenAI stream, broadcast updates over WebSockets, and safely append partial responses while broadcasting progress. Workflow specifics include npx durable-actors init, npx durable-actors dev for local runs, and npx durable-actors generate to create client bindings; Node.js 22.19+ and Bun 1.3.9+ are required. The repository includes examples (AI Chat, Collaborative Documents), an observer UI, Helm charts and SDKs, and is licensed MIT.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.