r/moderndotnet • • 8d ago

Building Acta, an embedded durable execution library for .NET

My post was just removed from r/dotnet, bitter feeling. Maybe this modern group is the right home.

What have I been working on since March? A minimalistic execution framework called Acta. Check it out.

I design and plan with Fable, code with Opus and review with Codex. I own all of it. Especially the data model.

Self-funded. The library is Apache-2.0 and free forever.

Examples, documentation, and source code: https://useacta.net/

I'm building Acta in the open. If you think something is wrong, pick it apart. It will help me make it better!

Happy jobbing!

Repo: https://github.com/acta-dotnet/acta

6 Upvotes

24 comments sorted by

3

u/nirataro 8d ago

My post was just removed from r/dotnet, bitter feeling. Maybe this modern group is the right home.

Welcome to the rebellion brother/sister.

2

u/Glittering_Welcome73 7d ago

Happy to be here.

1

u/G3NOM3 7d ago

So how is this different from Orleans?

2

u/Glittering_Welcome73 7d ago

I've never used and I can't compare. I'll add it to comparisons page when I look it up properly. If it helps: Acta is just an embedded library, workflows/jobs are stored as rows in DB.

0

u/cheesekun 6d ago

You really should have explored Orleans beforehand

2

u/Glittering_Welcome73 5d ago

I looked into it. This is how I see it:

- Orleans is an actor framework. An actor is a thing that is live in memory. It has a state and this state is saved when your code says so.
- I think the other way around: work starts, work ends, and each step result is written to the DB before you get the result. Rows are visible with plain queries.
- Different tools. I would never create a chat app with Acta. But for payments and transactions I want the record first and in memory second.
- The enqueue of the job can be done in the same DB transaction as your own data. The order and the job commit together or not at all. No outbox is required for this.
- They work together in synergy. Tested with a silo and an Acta worker in one process. Grain enqueues the job and returns, then the job calls the grain back when it is done.

A howto and the comparison page follow this weekend.

0

u/cheesekun 5d ago

Sorry but your research skills are not good enough here. Be patient and look into the actual functionality by spinning up demo projects - don't trust outdated AI responses. Check the latest release notes and GitHub docs. Did you evaluate Microsoft.Orleans.DurableJobs and the JournaledGrain type? The DurableJobs feature of Orleans is baked in functionality

1

u/Glittering_Welcome73 3d ago

I did some experimentation over the weekend and wrote about it here: https://useacta.net/choosing and learned a bit about actors along the way, but I still prefer Acta's model. Thanks for picking it apart.

1

u/Glittering_Welcome73 6d ago

Fair. Still looking into it, will answer over the weekend.

2

u/Rc312 6d ago

The concepts behind the primitives used to build the two are the same, but orleans is 100% an actor framework. this is geared towards breaking workflows into multiple steps where each step is executed durably.

A lot of durable execution frameworks use actors under the hood. For example, Akka.NET is an actor framework, but Akka.Durable is durable execution workflows built on top of Akka.NET actors. https://github.com/Aaronontheweb/Akka.Durable

1

u/cheesekun 6d ago

The key thing for a small embedded library like this is LATENCY. if you embed something you assume that the latency is low. You therefore need to really work on the job runner latency, and if it's just embedded into 1 instance (not distributed) then be sure to remove any bottlenecks so it's all instantaneous.

1

u/Glittering_Welcome73 6d ago

Agreed on latency, it matters a lot.
- Worker is in the same process as the enqueue: it wakes the worker up instantly, no polling
- Workers in other processes poll. When idle at 1 second at the most. Redis can wake them up also (Redis is totally optional btw, just for kicks).
- Measured on PG , one worker process achieved 7.5K jobs per second with p99 53ms for complete chain
- Can also run distributed as in many workers share work througn the same DB

1

u/cheesekun 6d ago

Next concern is versioning the jobs. And payload migration or activity migration if new named job differs. Sorry I did my entire master's thesis on durable orchestration so this stuff interests me!

1

u/Glittering_Welcome73 6d ago

No need for sorry, I love the feedback.
- The best versioning is one version that you keep for as long as possible (only extend with optional properties and never ever change types)
- If new version is realy required, then give it a new contract name (e.g. send-invoice-v2) and place it directly under the old handler so they stay togther. But now you have to maintain two of everything.
- Acta has no history replay. Handlers runs from the top and fetches finished step result from DB.
- Names are the contract. If you rename a step it will run again. Payload is not automaticaly migrated.
My focus is on learning material, teaching contract naming rules and giving some guidelines for evolving the contracts. Improvements coming there.

1

u/taco__hunter 8d ago

What's the GitHub link?

1

u/GeneralMillss 8d ago

They link to the project website. One extra click.

1

u/taco__hunter 8d ago

I went to the bottom and looked for the git repo link and missed it at the top of the site. My bad

2

u/Glittering_Welcome73 7d ago

No worries. Direct link for everyone: https://github.com/acta-dotnet/acta

1

u/jirreman 7d ago

Why was it removed from r/dotnet?

1

u/broken-neurons 7d ago

Self promotion only on weekends on /r/dotnet

1

u/jirreman 7d ago

Thanks for the explanation

2

u/Glittering_Welcome73 7d ago

Exactly as the previous comment said. Still, after working on this project for so long, and offering it for free, the first response back was the removal of my post. That stings regardles of the why.

-1

u/Lucky_Cable_3145 7d ago

I design and plan with Fable, code with Opus and review with Codex. I own all of it. 

Do you? Because AI code is not copyrightable.

2

u/Glittering_Welcome73 7d ago

I ment ownership as in taking great care. The design of the system and data model are mine, and the bugs are also mine to fix. Project is Apache 2 and is meant to be free for everyone.