Durable beside Hatchet

An engine dispatches tasks to workers you run. The workers, the idempotency and the compensation stay with you.

Open in CursorView as Markdown

The shape: a task platform. Why Durable steps this walk beat by beat; this page is the walk in prose, with the page each beat reads under Sources, and Compared is the table of every product.

What Hatchet gives, as its documentation describes#

Workers you run. Tasks run on long-running worker processes you start in any environment, locally or on a VM. Each registers its tasks with the engine under a client token and holds a fixed count of slots. More workers registering the same task is how it scales. [1]

A task can run more than once. Tasks are not silently dropped and failures retry per configuration; a task can run more than once, so task code should be idempotent or otherwise safe to retry. [2]

Durable tasks between checkpoints. A durable task checkpoints when it sleeps, waits or spawns a child, and must be deterministic between checkpoints; databases and external APIs belong in child tasks. [3]

An idempotency key with a window. Idempotency is an expression over a run's input and metadata, set on a workflow or a standalone task, with a sliding window or a claim held while the run is active; a duplicate raises a collision error or, from an event, is absorbed. [4]

Manual retries, no dead-letter queue. There is no built-in dead-letter queue; a failed run persists in the dashboard for manual management and is replayed with its original input from its run view. Runs are cancelled or replayed in bulk by a list of ids or by filters. [5][6]

A dashboard of runs and workers. The dashboard shows runs with their status, inputs, outputs and execution history, the connected workers with their health, and the workflows with their definitions and recent activity. It serves debugging, operational checks and ad hoc triggers. [7]

The same work under Durable#

No worker to run. The engine is a library inside your app's own functions on the Postgres it already has, with a minute cron as the one moving part outside the request path.

The key is the input's. key: ["orderId", "requestId"], a field list that never reads the clock; one run holds the key for its life, so there is no window to size and no collision to catch.

Side effects stay in the step. A step is the one place a body reads the world; its input and output land on a row before the body goes on, and a finished step is served from its row on every later attempt.

The undo in reverse, then limbo. Every step that changes the world declares its undo beside its effect or says why it cannot; the door refuses one that says neither, and the undos run in reverse, each its own row. A failed run waits in limbo for a person after bounded redrives of a transient cause, with its rows, its images and the remedy; nothing is retried in the dark.

The agent asks the graph. 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.

Nothing to write but the steps. No fleet, no idempotency expression, no child task per side effect; the ledger holds the before and after image of every write, durable-sdk ledger verify --file <export> walks an export offline, and durable-sdk doctor --host runs every rule before a deploy.

What you write yourself#

What you write yourself Hatchet Durable
Workers you run The fleet: written, tokened, sized by slots, deployed and scaled by adding workers. none; the engine is a library inside your functions, a minute cron beside
A task can run more than once Idempotent task code, since a retried task may run again. a finished step is served from its row; a provider write reads before it writes
Durable tasks between checkpoints Every side effect moved into a child task by hand. a step the one place a body reads the world, its input and output on its row
An idempotency key with a window The expression, and the window or fallback you size. the intent key, a field list, for the row's life; no window, no collision
Manual retries, no dead-letter queue The undo of what already succeeded when a later task fails: the docs describe an on-failure task that runs when a task in the workflow fails, its body yours, and no reverse declared per task. And the triage of each failed run by a person in the dashboard, one at a time or by filter. the undo declared on the step, run in reverse; limbo for a person with the rows
A dashboard of runs and workers A record of what a task changed in your own tables. The run's history there is its status, inputs and outputs, and the docs describe no before or after image of the rows it touched. the ledger: before and after images of the rows a step touched

When Hatchet wins: workers in several languages on machines you choose, an open-source control plane you can run yourself with a dashboard of workers and queues, and an agent loop that spawns many children and streams its progress.

Sources#

  1. https://docs.hatchet.run/v1/workers
  2. https://docs.hatchet.run/v1/architecture-and-guarantees
  3. https://docs.hatchet.run/v1/durable-tasks
  4. https://docs.hatchet.run/v1/idempotency
  5. https://docs.hatchet.run/v1/bulk-retries-and-cancellations
  6. https://docs.hatchet.run/reference/typescript/runnables
  7. https://docs.hatchet.run/v1/developer-experience