Absurd Workflows: Durable Execution with Just Postgres

lucumr.pocoo.org

168 points by ingve 8 days ago


rodmena - 2 hours ago

And here is the Python Client for Absurd:

https://python-absurd-client.readthedocs.io/en/latest/quicks...

mfrye0 - 5 days ago

I've been keeping an eye on this space for awhile as it matures a bit further. There's been a number of startups that have popped up around this - apart from Temporal and DBOS, Hatchet.run looked interesting.

I've been using BullMQ for awhile with distributed workers across K8 and have hacked together what I need, but a lightweight DAG of some sort on Postgres would be great.

I took a brief look at your docs. What would you say is the main difference of yours vs some of the other options? Just the simplicity of it being a single sql file and a sdk wrapper? Sorry if the docs answer this already - trying to take a quick look between work.

phs318u - 5 days ago

Wow. Everything old is new again. I built a business state machine for a bespoke application using Oracle 8i and their stateful queues back in 2005. I had re-architected a batch-driven application (which couldn't scale temporally i.e. we had a bunch of CPU sitting near idle for a lot of the time), and turned it into an event driven solution. CPU usage became almost a horizontal line, saving us lots of money as we scaled (for the record, "scale" for this solution was writing 5M records a day into a partitioned table where we kept 13 months of data online, and then billed on it). Durable execution was just one of the many benefits we got out of this architecture. Love it.

saadatq - 5 days ago

Somebody said this the other day on HN, but we really are living in the golden age of Postgres.

rodmena - 5 days ago

Armin, I managed to review absurd.sql and the migrations. I am so impressed that I am rewriting the state management of my workflow engine with Absurd. Just wanted to thank you for sharing it with us. I'll keep you posted of the outcome.

rodmena - 3 days ago

FYI. Highway DSL now fully supports Absurd. Specs: https://github.com/rodmena-limited/highway_dsl/blob/main/spe...

eximius - 5 days ago

This is pretty great! The main thing you need for durable execution is 1) retries (absurd does this) 2) idempotency (absurd does this via steps - but would be better handled with the APIs themselves being idempotent, then not using steps. Though absurd would certainly _help_ mitigate some APIs not being idempotent, but not completely).

stevefan1999 - 5 days ago

Did anyone have a new approach to do this kind of transactional workflow? I heard that Saga patterns also define invertibility as well but I want a more general framework that also does all of this in one.

Also, I noticed how durable execution actually have so much to do with Continuation-passing style, is my intuition correct?

rodmena - 5 days ago

I think it's a brilliant idea. Absurd can be a very good match to highway_dsl as well (which is a domain-specific-language, for workflows)

https://github.com/rodmena-limited/highway_dsl?tab=readme-ov...

- 5 days ago
[deleted]
oulipo2 - 8 days ago

Really cool! How does it compare to DBOS ? https://docs.dbos.dev/architecture

immibis - 5 days ago

In what sense are these durable, given that they restart from the beginning if the server process crashes?

motoboi - 5 days ago

Restate was built for agents before agents were cool.

Surprisingly haven take off yet when agents is all we are looking for now.

andrewstuart - 5 days ago

Reminder that Postgres does not have a monopoly on SKIP LOCKED

You can do that in Oracle, SQL server and MySQL too.

In fact you might be able to replicate what Armin is doing with SQLite because it too works just fine as a queue though no via SKIP LOCKED.

oulipo2 - 8 days ago

Other question: why reimplementing your framework, rather than using an existing agent framework like Claude + MCP, or OpenAI + tool calling? Is it because you're using your own LM models, or just because you wanted more control on retries, etc?

crabmusket - 5 days ago

Not to be confused with https://github.com/jlongster/absurd-sql (note the hyphenation)

SrslyJosh - 5 days ago

Durable execution paired with an unpredictable text generator? Sign me up! /s