Durable beside DBOS
A library on your Postgres checkpoints each step. The determinism, the retries and the undo stay with you.
A durable-execution library: DBOS
What it gives by its own documentation, what that leaves you to write, and the same work under Durable. Each product compared has a page like this one.
What DBOS gives, as its documentation describes
- 1
A library on your database
- it gives
- Annotated workflows and steps run inside your app; Postgres is the only required infrastructure, and the inputs, each step's output and the outcome are checkpointed there.
- you write
- An app that stays up, since its own processes poll the queues, fire the schedules and recover at their own restart. With several servers, each recovers its own workflows by executor id, or its control plane tells one to recover another's. A direct connection to its database, or a pooler in session mode.
- 2
Deterministic workflow code
- it gives
- Database access, external calls, randomness and the clock belong in steps. Parallel steps must be started in a deterministic order, reserved step ids the recommended way to hold it. A step whose result differs on replay throws a nondeterminism error at runtime.
- you write
- That discipline in every workflow function, a slip learned at runtime when a replay's step result differs.
- 3
Steps at least once, retries off
- it gives
- A step is tried at least once and not re-executed once it completes; retries are off by default and set per step. An uncaught error ends the workflow in an error status DBOS does not recover on its own, left for a person to fork or rewind from a step.
- you write
- Idempotent steps, the retry settings on each step, and the watch on errored workflows through the management tooling.
- 4
A workflow id as the key
- it gives
- Each execution has an id, a UUID unless you pass your own, and the id doubles as an idempotency key. A repeated id runs once and by default hands back a handle to the workflow already started; a reject policy throws instead.
- you write
- The id itself, computed from the intent by you and passed at the start, so a resend finds the run it already made.
- 5
Recovery across processes
- it gives
- On one node interrupted workflows are picked up at startup; across several processes recovery relies on a control plane the app connects to, or a manual process.
- you write
- The control plane's connection, or an executor id in each process's configuration. On a breaking change, a patch statement in the code, with the application version pinned so new processes still recover the old runs. Or else a new version, computed from the source by default, with the old version's processes kept up until their workflows finish.
- 6
Checkpoints under a retention policy
- it gives
- A completed workflow's steps, inputs and outputs stay in the system database; a retention policy you set deletes completed history past a time or a row count, both off by default, and a running workflow is never deleted.
- you write
- Any undo of a completed step: a step's own handling is retries and a timeout, and a restart resumes from the last completed step with its return value as the checkpoint. The before image of your own data as well, since the checkpoint is the value the step returned.
The same work under Durable
- 7
Also a library on your Postgres, with no process to keep up
- it does
- The one moving part outside the request path is a minute cron; nothing stays resident for the scheduler, the queue or recovery, and the cron minute is the fallback for every wake.
- 8
The key is derived from the input
- it does
- key: ["orderId", "requestId"]: you name the fields of the input and the engine derives the key, one run per intent; a key that reads the clock is refused before a deploy, never minted as a UUID at runtime.
- 9
The images, then the undos in reverse
- it does
- A write reads before it writes and leaves the image it found and the image it left on an append-only, hash-chained ledger; the step declares its undo beside its effect or says why it cannot. The completed steps' undos run in reverse, each its own row, and the run waits in limbo for a person after bounded redrives of a transient cause; a redrive reads the world before it writes.
- 10
Before the deploy
- it does
- The same discipline holds, a step the one place a body reads the world. durable-sdk doctor --host runs every rule over the tree offline before a deploy, a failed rule one line with its id and its fix; a nondeterministic body there is an error thrown at runtime.
- 11
The agent asks the graph
- it does
- durable-sdk explain <workflow> prints what the door admits, every step with its undo and its writes, the facts and who listens; durable-sdk graph walk <subject> prints the closure from any node; durable-sdk graph impact --changed prints what a change reaches before it is made. Offline, over a committed index: an AI coding agent asks before it edits, never guesses.
- 12
Nothing to write but the steps
- it does
- No retry switch per step, no patch marker, no control plane; durable-sdk ledger verify --file <export> walks the ledger's export offline, and the console reads runs, steps with their images, limbo, facts and limits from your own database.
- you write
- The steps and their undos.
When DBOS wins: a team in Python, Go or Java, throughput past one Postgres server with the sharding to carry it, and a control plane that recovers a dead process's runs, sizes the fleet and forks a run from any step. The walk in prose, with its sources.
The whole table, with every source, in Compared.
One charge, and a row that says so.
Two commands to an app with a ledger, and one that asks the graph what happens before you edit.