frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Build durable workflows with Postgres

https://www.dbos.dev/blog/why-postgres-durable-execution
65•KraftyOne•3h ago

Comments

cpursley•3h ago
I've been using https://www.pgflow.dev for workflows which is built on pgmq and am really impressed so far. Most of the logic is in the database so I'm considering building an Elixir adapter DSL.
ishita_julep•2h ago
what are you using the DSL for?
cpursley•2h ago
It’s used to generate the database migration that defines the flows. More syntax sugar than anything.
mmcclure•17m ago
Just curious, if you’re already in Elixir and using Postgres, why not use Oban[1]? It’s my absolute favorite background job library, and the thing I often miss most when working in other ecosystems.

[1] https://github.com/oban-bg/oban

tonyhb•2h ago
Anything that guarantees exactly once is selling snake oil. Side effects happen inside any transaction, and only when it commits (checkpoints) are the side effects safe.

Want to send an email, but the app crashes before committing? Now you're at-least-once.

You can compress the window that causes at-least-once semantics, but it's always there. For this reason, this blog post oversells the capabilities of these types of systems as a whole. DBOS (and Inngest, see the disclaimer below) try to get as close to exactly once as possible, but the risk always exists, which is why you should always try to use idempotency in external API requests if they support it. Defense in layers.

Disclaimer: I built the original `step.run` APIs at https://www.inngest.com, which offers similar things on any platform... without being tied to DB transactions.

KraftyOne•2h ago
As the post says, the exactly-once guarantee is ONLY for steps performing database operations. For those, you actually can get an exactly-once guarantee by running the database operations in the same Postgres transaction as your durable checkpoint. That's a pretty cool benefit of building workflows on Postgres! Of course, if there are side effects outside the database, those happen at-least-once.
tonyhb•2h ago
You can totally leverage postgres transactions to give someone... postgres transactions!

I just figured that the exactly once semantics were so worth discussing that any external side effects (which is what orchestration is for) aren't included in that, which is a big caveat.

jedberg•2h ago
> Anything that guarantees exactly once is selling snake oil.

That's a pretty spicy take. I'll agree that exactly-once is hard, but it's not impossible. Obviously there are caveats, but the beauty of DBOS using Postgres as the method of coordination instead of the an external server (like Temporal or Inngest) is that the exactly-once guarantees of Postgres can carry over to the application. Especially so if you're using that same Postgres to store your application data.

abtinf•2h ago
Why not just use Temporal?
KraftyOne•2h ago
We wanted to make workflows more lightweight--we're building a Postgres-backed library you can add to your existing application instead of an external orchestrator that requires you to rearchitect your system around it. This post goes into more detail: https://www.dbos.dev/blog/durable-execution-coding-compariso...
at0mic22•2h ago
Every few years someone discovers FOR UPDATE SKIP LOCKED and represents it. I remember it lasting for 15 years at least
qianli_cs•2h ago
Yup, some features are timeless and deserve a re-intro every now and then. SKIP LOCKED is definitely one of them.
skrtskrt•2h ago
with a nice NOWAIT when appropriate
atombender•38m ago
The "someone" in this case happens to be Michael Stonebraker, the creator of Postgres and CTO of DBOS.
alpb•2h ago
I've been following DBOS for a while and I think the model isn't too different than Azure Durable Functions (which uses Azure Queues/Tables under the covers to maintain state). https://learn.microsoft.com/en-us/azure/azure-functions/dura...

Perhaps the only difference is that Azure Durable Functions has more syntactic sugar in C# (instead of DBOS choice being Python) to preserve call results in the persistent storage? Where else do they differ? At the end, all of them seem to be doing what Temporal is doing (which has its own shortcomings and it's also possible to get it wrong if you call a function directly instead of invoking it via an Activity etc)?

KraftyOne•2h ago
Both do durable workflows with similar guarantees. The big difference is that DBOS is an open-source library you can add to your existing code and run anywhere, whereas Durable Functions is a cloud offering for orchestrating serverless functions on Azure.
alpb•1h ago
As far as I know, Azure Durable Functions doesn't have a server-side proprietary component and it's actually fully open source framework/clients as well. So it's actually not a cloud offering per-se. You can see the full implementations at:

* https://github.com/Azure/durabletask

* https://github.com/microsoft/durabletask-go

cmdtab•2h ago
Recently moved some of the background jobs from graphile worker to DBOS. Really recommend for the simplicity. Took me half an hour.

I evaluated temporal, trigger, cloudflare workflows (highly not recommended), etc and this was the easiest to implement incrementally. Didn't need to change our infrastructure at all. Just plugged the worker where I had graphile worker.

The hosted service UX and frontend can use a lot of work though but it's not necessary for someone to use. OTEL support was there.

LudwigNagasena•1h ago
What was the reason for the transition?
cmdtab•1h ago
Needed checkpoints in some of our jobs wrapping around the AI agent so we can reduce cost and increase reliability (as workflow will start from mid step as opposed to a complete restart).

We already check pointed the agent but then figure it's better to have a generic abstraction for other stuff we do.

diarrhea•1h ago
Interesting!

What made you opt for DBOS over Temporal?

cmdtab•1h ago
Temporal required re-architecting some stuff, their typescript sdk and sandbox is bit unintuitive to use so would have been an additional item to grok for the team, and additional infrastructure to maintain. There was a latency trade off too which in our case mattered.

Didn't face any issue though. Temporal observability and UI was better than DBOS. Just harder to do incremental migration in an existing codebase.

rlili•1h ago
Some other lightweight solutions around:

https://github.com/iopsystems/durable

https://github.com/maxcountryman/underway

darkteflon•1h ago
Often wondered whether it would be possible / advisable to combine DBOS with, e.g., Dagster if you have complex data orchestration requirements. They seem to deal with orthogonal concerns but complement nicely. Is integration with orchestration frameworks something the DBOS team has any thoughts on?
KraftyOne•1h ago
Would love to learn more about what you're building--what problems or parts of your system would you solve with Dagster vs DBOS?
agambrahma•50m ago
Curious how this compares to Cloudflare, which is the other provider that is really going for simplified workflows
atombender•30m ago
While DBOS looks like a nice system, I was really disappointed to learn that Conductor, which is the DBOS equivalent of the Temporal server, is not open source.

Without it, you get no centralized coordination of workflow recovery. On Kubernetes, for example, my understanding is that you will need to use a stateful set to assign stable executor IDs, which the Conductor doesn't need.

I suppose that's their business model, to provide a simplistic foundation where you have to pay money to get the grown up stuff.

jumploops•27m ago
I've been looking at migrating to Temporal, but this looks interesting.

For context, we have a simple (read: home-built) "durable" worker setup that uses BullMQ for scheduling/queueing, but all of the actual jobs are Postgres-based.

Due to the cron-nature of the many disparate jobs (bespoke AI-native workflows), we have workers that scale up/down basically on the hour, every hour.

Temporal is the obvious solution, but it will take some rearchitecting to get our jobs to fit their structure. We're also concerned with some of their limits (payload size, language restrictions, etc.).

Looking at DBOS, it's unclear from the docs how to scale the workers:

> DBOS is just a library for your program to import, so it can run with any Python/Node program.

In our ideal case, we can add DBOS to our main application for scheduling jobs, and then have a simple worker app that scales independently.

How "easy" would it be to migrate our current system to DBOS?

KraftyOne•22m ago
I'd love to learn more about what you're building--just reach out at peter.kraft@dbos.dev.

One option is that you have DBOS workflows that schedule and submit jobs to an external worker app. Another option is that your workers use DBOS queues (https://docs.dbos.dev/python/tutorials/queue-tutorial). I'd have to better understand your use case to figure out what would be the best fit.

TiXL – Free and Open Source Motion Graphics

https://tixl.app/
1•stephdin•2m ago•0 comments

I built an AI charting platform

https://www.aulico.com/
5•imatelescope•5m ago•0 comments

How America Wins the Invisible War

https://arenamag.com/articles/how-america-wins-the-invisible-war
1•transpute•7m ago•0 comments

Show HN: Network For Developers to give opinions on frameworks, software, etc.

https://v0-launch-waitlist-page-5bgpqdhii-abdmog01-gmailcoms-projects.vercel.app/
1•AbdMog•9m ago•0 comments

How many tabs do you keep open at the same time?

1•Toby1VC•10m ago•0 comments

Newsom says CA will hold special election to combat Trump, TX redistricting

https://sfstandard.com/2025/08/08/newsom-california-election-redistricting-trump-texas/
2•littlexsparkee•11m ago•1 comments

Flow Sensitivity Without CFG: An Efficient Andersen-Style Pointer Analysis

https://arxiv.org/abs/2508.01974
1•matt_d•11m ago•0 comments

How to safely escape JSON inside HTML SCRIPT elements

https://sirre.al/2025/08/06/safe-json-in-script-tags-how-not-to-break-a-site/
1•dmsnell•12m ago•1 comments

How to Navigate the Jungle of Online Job Postings

https://www.wsj.com/lifestyle/careers/how-to-navigate-the-jungle-of-online-job-postings-69902b11
1•vdalal•14m ago•1 comments

Do they even test this?

https://mariadb.org/do-they-even-test-this/
1•samaysharma•14m ago•0 comments

Update on Malicious Gems Removal

https://blog.rubygems.org/2025/08/08/malicious-gems-removal.html
1•mooreds•21m ago•0 comments

Show HN: A Python CEL implementation (written in Rust)

1•hardbyte•23m ago•0 comments

Height Differece Tool

https://es.heightcomparisonchart.com
1•jason66•24m ago•0 comments

Back End to AI Engineer: A Realistic Path

https://hamed-rafati.medium.com/backend-to-ai-engineer-a-realistic-path-7399cc90fdbe
1•hamedz•24m ago•0 comments

JWT or Not: Personally Insecure Reflections on Software (In)Security [video]

https://www.youtube.com/watch?v=IgKRGS6cQWw
1•mooreds•25m ago•0 comments

Co-Founder and CTO of FusionAuth Daniel DeGroff on DIY Cyber Guy [audio]

https://diycyberguy.com/2025/08/07/degroff/
1•mooreds•26m ago•0 comments

L. E. Modesitt, jr. interview (2024)

http://fantasyhotlist.blogspot.com/2024/10/new-l-e-modesitt-jr-interview.html
2•stacktrust•28m ago•1 comments

The Lean Startup: Zen, the Art of Failing Fast and Reclaiming Aesthetic Vision

https://medium.com/@guillaume.a.pignol/the-lean-startup-zen-the-art-of-failing-fast-and-reclaiming-aesthetic-vision-497e98d026cf
1•light_triad•29m ago•0 comments

Roleplay worlds with AI just like you were reading a book

https://www.jaquelene.com/
1•chiefgui•31m ago•0 comments

Tsutomu Yamaguchi: The man who survived both atomic bombs

https://www.rnz.co.nz/news/world/569474/tsutomu-yamaguchi-the-man-who-survived-both-atomic-bombs
3•billybuckwheat•31m ago•1 comments

How to Form an Opinion

https://idiallo.com/blog/how-to-form-an-opinion
1•foxfired•34m ago•0 comments

Show HN: Tiered storage and fast SQL for InfluxDB 1.x/2.x

https://historian.exydata.com
1•ignaciovdk•36m ago•0 comments

Vector Types and Debug Performance

https://blog.s-schoener.com/2025-08-07-vector-debug-codegen/
1•matt_d•39m ago•0 comments

Map Shows States Where Property Tax Could Be Repealed

https://www.newsweek.com/map-property-tax-repeal-reform-2110266
1•harambae•39m ago•0 comments

The US has a bullfrog problem

https://www.vox.com/down-to-earth/422353/bullfrogs-invasive-west-native-species
1•bookofjoe•40m ago•0 comments

Bitcoin Demand Shift: Coinbase's 60-Day BTC Premium Streak Is at Risk

https://www.coindesk.com/markets/2025/07/29/bitcoin-demand-shift-coinbase-s-60-day-btc-premium-streak-is-at-risk
1•PaulHoule•41m ago•0 comments

Open-source control plane for Docker MCP Gateways?

1•GeneBordegaray•41m ago•0 comments

SpaceX Dragon Undocking from ISS

https://twitter.com/SpaceX/status/1953935434528002165
1•fillskills•42m ago•2 comments

Article: A Case of Bromism Influenced by Use of Artificial Intelligence

https://www.acpjournals.org/doi/10.7326/aimcc.2024.1260
2•zahirbmirza•42m ago•3 comments

How does Tor work? (2023)

https://skerritt.blog/how-does-tor-really-work/
1•bbno4•44m ago•0 comments