23 points thomask1995 1 day ago 17 comments

Hi HN, we're Thomas and Olivier from Terse (https://www.useterse.ai/) We've built Durable Actors, an open-source alternative to Cloudflare's Durable Objects.

A Durable Object/Actor is a tiny server that handles one request at a time and has its own SQLite database. There's exactly one of each in the world and it is addressed by name.

This is the perfect primitive for deploying multiplayer agents. Each agent can have its own Durable Actor, and each user can connect to that Actor via websocket. This is fully horizontally scalable. Your users can deploy and share agents at will without putting pressure on a central DB or websocket server.

Durable Actors are also great for coordinating agents within a system. Since only one request is handled at a time, you can protect critical data such as a CRM and allow multiple agents to run concurrently without worrying about data races.

The only alternative to this is Cloudflare's Durable Objects. However, there is extreme lock in (they pull you into D1, R2 + workers as well) and it wasn't originally built for agentic workfloads when it was released 5 years ago.

Some notable projects built on Durable Objects include RampInspect, OpenInspect as well as the multiplayer frameworks Liveblocks and PartyKit. You can now build these kinds of projects on Durable Actors.

Durable Actors is a version of DO that is built for concurrent agentic workloads. It is fully open source (MIT License) and includes a helm chart for you to easily self-host.

Some key features:

- Configurable compute: Specify CPU, RAM, data residency, idle-timeouts all in a decorator

- No outer worker: We generate a type-safe client that you can just plug into your existing tech stack.

- (coming soon, like today) Export SQLite table via CLI + MCP for exposing OLTP logs to your agent to help you debug.

And our Performance Numbers (all p95):

- Durable write: 85.6ms

- Stateful Read (data in sqlite): 2.14ms

- Actor Warm up: 334ms

Here is a little counter demo so you can see the latency yourself: https://demo.useterse.ai/

Would love your feedback!

m1117 1 hour ago | parent

Great! Let’s have more cloudflare alternatives

thomask1995 1 hour ago | parent

Yes! would love to know what you think.

Want to make this the best product possible

verst 1 hour ago | parent

How do you compare to Azure Durable Functions, Temporal, AWS Lambda Durable Functions?

Can't Durable Entities meet the same use cases?

EDIT: Of course I am not talking about the difference in OSS vs not. Rather I'm interested in the difference in use cases and capabilities. Some of the aforementioned have ways to run things locally as well, though they are designed as distributed cloud-based PaaS services.

jeremycarter 1 hour ago | parent

The latency on those listed products is high because it's async queue based processing. This on the other hand should have predictable low latency as the placement of the live object is known.

verst 1 hour ago | parent

I don't yet live in a world where my agents are fast enough where the cloud service latency matters :)

olism 52 minutes ago | parent

thanks for the question verst. durable actors manages durable state, not durable execution. Azure Durable functions, temporal, aws lamda durable functions are for managing execution.

each actor has its own sqlite DB and runs on one host at a time. Clients call it via RPC or Websocket message, changing state and actor pushes state changes back to every client. product is more similar to cf durable objects or orleans.

i took a look at durable entities, state model is similar but they don't support websocket handling.

thomask1995 44 minutes ago | parent

Olivier's comment seems to have been suppressed. Not sure why. reposting

thanks for the question verst. durable actors manages durable state, not durable execution. Azure Durable functions, temporal, aws lamda durable functions are for managing execution. each actor has its own sqlite DB and runs on one host at a time. Clients call it via RPC or Websocket message, changing state and actor pushes state changes back to every client. product is more similar to cf durable objects or orleans.

i took a look at durable entities, state model is similar but they don't support websocket handling.

jeremycarter 1 hour ago | parent

Looks great but one of the common problems with the virtual actor model is state query. It's all well and good to have nice separated state dbs but for most use cases that means further double up on storing the state again in another database that can query it. I don't think anyone has come up with a nice solution for this problem without using a loose document database, but even then actors can change their schema.

Perhaps emitting versioned domain events transactionally with the actor state is an option without prescribing an exact solution.

thomask1995 1 hour ago | parent

This is a great comment! We actually get this a lot.

Since we are so early, we can build this the right way. I agree, I think we need something you can set up to sync to a data lake. I started really simple with exporting at certain times, but I think there is more to do here.

I really want to nail this part of the experience. I agree, it is a big sticking point

handfuloflight 1 hour ago | parent

How does it compare to celld?

m1117 1 hour ago | parent

I think they’re more configurable compute wise

thomask1995 1 hour ago | parent

Hey! so celld is a direct port of Durable Objects.

We are actually a different API. I come from writing swift for 7 years (I was at apple) and really thought they nailed the actor model so modeled ours similarly.

Also, we make it really easy to configure each actors compute with just a decorator. So if you want to do something beefy like store file directory in an actor you can increase the memory to 4GB and you are good to go!

Happy to go into more detail here as well!

steve_adams_86 12 minutes ago | parent

> I come from writing swift for 7 years (I was at apple) and really thought they nailed the actor model

Which actor models are you comparing to? What do you think of Erlang/Pekko/Pony?

I roughly understand their models but have never looked at Swift's. On the surface it looks like it borrows heavily from each of these (now that I'm looking) which sounds potentially awesome. I suppose I'm curious what you think makes Swift's model 'nailed' relative to alternatives.

It's pure curiosity. I love actor models and enjoy learning about the paradigm in general.

divyagnan 59 minutes ago | parent

This looks really nice! How would you compare it to Rivet? I think they were also originally pitched as an open source version of durable objects: https://rivet.dev/actors/compare/rivet-actors-vs-cloudflare-...

Also are you able to self-host this outside of GCP (from the docs it seems like it is locked to GCP but I'm not that familiar with it so maybe not)?

thomask1995 22 minutes ago | parent

Hey! Yea we are a very different API from them. Closer to Cloudflare for sure.

Our biggest differentiator is the configurable compute. With our helm chart, you just add a decorator and can specify how much RAM, CPU etc... an actor class has.

We are pretty opinionated on how to host these. The helm chart gets you a fully horizontally scalable deployment.

anilgulecha 54 minutes ago | parent

100ms for a write - not usable for anything beyond toys.

I mean we have https://github.com/denoland/celld - with a known good open source history. Durable writes there are as low as 1ms.

thomask1995 7 minutes ago | parent

Hey! durable writes for celld (single node, wait for bucket) is 90ms. Documented pretty clearly on the landing page.

Celld is pretty cool in that you can configure a small fleet in the same VPS and get super fast durable writes (with a weaker guarantee). We are also going to allow you to tweak the durability guarantees so you can manage that trade off yourself!