Show HN:ActorCore – 可在任何地方运行的有状态无服务器框架
Show HN: ActorCore – Stateful serverless framework that runs anywhere

原始链接: https://github.com/rivet-gg/actor-core

ActorCore 提供了一种革命性的无服务器计算方法,称为“有状态无服务器”,旨在构建需要持久化数据的应用程序,例如 AI 代理和协作工具。与传统的无服务器函数不同,ActorCore单元在请求之间保留数据,在许多场景中无需数据库。数据存储在与计算相同的机器上,从而实现极快的读写速度和低延迟的实时更新。 ActorCore 自动保存代码状态,按需扩展而无需服务器管理。主要优点包括内存中状态、边缘位置数据以实现更快的交互以及内置的实时功能。它非常适合需要性能和可扩展性的应用程序,可以使用 JavaScript 或 SQLite。虽然它目前可能不是 OLAP 或高度关系型数据的最佳选择,但它为许多用例提供了强大的替代方案。该框架旨在几乎可以在任何地方部署,并且随着持续的标准化工作,ActorCore 旨在成为有状态无服务器的通用标准。

ActorCore,一个新的开源、有状态的无服务器框架,已在 Hacker News 上发布,旨在将类似 Cloudflare Durable Object 的功能带到任何云平台。它由 Rivet Actors 团队创建,旨在解决厂商锁定、生态系统限制以及合并状态和计算所需的概念转变等问题。 它支持多个平台,例如 Rivet Actors、Cloudflare Durable Objects、Redis 和 Node.js/Bun。ActorCore 使用内存中的 JavaScript 对象进行状态管理,SQLite 支持即将推出,通过将数据保持在靠近用户的位置来减少延迟。可调一致性允许同时进行持久性工作负载和快速状态更新。 创建者们正专注于文档和社区建设,以帮助开发者适应有状态的无服务器模型。最初的反馈是积极的,用户强调了它的潜力。它被定位为 PartyKit 的替代方案,提供了增强的功能,例如 TypeScript 类型安全、简化的状态持久性和灵活的调度 API。团队渴望获得社区的反馈和贡献。

原文
ActorCore

Stateful Serverless That Runs Anywhere

The easiest way to build stateful, AI agent, collaborative, or local-first applications.
Deploy to Rivet, Cloudflare, Bun, Node.js, and more.

DocumentationDiscordXBluesky

Start By Framework

Start With Studio

Rivet  Open Studio

Start With Template

What is Stateful Serverless?

  Long-Lived, Stateful Compute

Each unit of compute is like a tiny server that remembers things between requests – no need to reload data or worry about timeouts. Like AWS Lambda, but with memory and no timeouts.

  Durable State Without a Database

Your code's state is saved automatically—no database, ORM, or config needed. Just use regular JavaScript objects or SQLite (available in April).

  Blazing-Fast Reads & Writes

State is stored on the same machine as your compute, so reads and writes are ultra-fast. No database round trips, no latency spikes.

  Realtime, Made Simple

Update state and broadcast changes in realtime. No external pub/sub systems, no polling – just built-in low-latency events.

  Store Data Near Your Users

Your state lives close to your users on the edge – not in a faraway data center – so every interaction feels instant.

  Serverless & Scalable

No servers to manage. Your code runs on-demand and scales automatically with usage.

Have more questions? Jump to our FAQ →

Browse snippets for how to use ActorCore with different use cases.

SQLite will be available in late April. We’re working on publishing full examples related to these snippets. If you find an error, please create an issue.

Deploy ActorCore anywhere - from serverless platforms to your own infrastructure. Don't see the runtime you want? Add your own.

Seamlessly integrate ActorCore with your favorite frameworks, languages, and tools. Don't see what you need? Request an integration.

Local Development with the Studio

Like Postman, but for all of your stateful serverless needs.

Visit The Studio →

Help make ActorCore the universal way to build & scale stateful serverless applications.

Frequently Asked Questions

How is ActorCore different than Rivet Actors?

ActorCore is a framework written in TypeScript that provides high-level functionality. Rivet is an open-source serverless platform written in Rust with features tailored for stateful serverless.

You can think of it as ActorCore is to Rivet as Next.js is to Vercel.

While Rivet is the primary maintainer of ActorCore, we intend for this to be community driven.

How does stateful serverless compare to the traditional actor model?

Stateful serverless is very similar to actors: it's essentially actors with persistence, and usually doesn't have as rigid constraints on message handling. This makes it more flexible while maintaining the core benefits of the actor model.

How do stateful and stateless serverless work together?

Stateless serverless works well when you have an external resource that maintains state. Stateful serverless, on the other hand, is almost like a mini-database.

Sometimes it makes sense to use stateless serverless to make requests to multiple stateful serverless instances, orchestrating complex operations across multiple state boundaries.

How does ActorCore achieve huge performance gains?

By storing state in memory and flushing to a persistence layer, we can serve requests instantly instead of waiting for a round trip to the database. There are additional optimizations that can be made around your state to tune the durability of it.

Additionally, data is stored near your users at the edge, ensuring round-trip times of less than 50ms when they request it. This edge-first approach eliminates the latency typically associated with centralized databases.

Isn't well-designed software supposed to separate compute and storage?

Some software makes sense to separate – e.g., for data lakes or highly relational data. But at the end of the day, data has to be partitioned somewhere at some point.

Usually "faster" databases like Cassandra, DynamoDB, or Vitess make consistency tradeoffs to get better performance. Stateful serverless forces you to think about how your data is sharded for better performance, better scalability, and less consistency footguns.

What is stateful serverless not good for?

OLAP, data lakes, graph databases, and highly relational data are currently not ideal use cases for stateful serverless, though it will get better at handling these use cases over time.

Can this create a single bottleneck?

Yes, but only as much as storing data in a single database row does. We're working on building out read replicas to allow you to perform read-only actions on actors.

Stateless serverless is standardized under WinterTC. Is there any intention to standardize stateful serverless?

Things are cooking! Check out our blog post about what a W3C standard for stateful serverless might look like and the awesome people who are collaborating on this.

Have more questions? Join our Discord or go to GitHub Discussions.

We ship fast, so we want to share what you can expect to see before the end of the year. Help shape our roadmap by creating issues and joining our Discord.

Apache 2.0

Scale without drama – only with ActorCore.

联系我们 contact @ memedata.com