Skip to content
trestle

Code that survives crashes and long waits

Pick another answer

Durable execution on your own database

What Temporal, Restate, Inngest, DBOS, and cloud step functions call a workflow is a process here. Whether you use those tools or stitch jobs with queues and cron, Trestle runs that model in a library over your database, saving each step before it starts.

claim 1042Pay the claim

  1. Attempt 1key 7f3a9cbegan 09:12:04engine 1 died mid-paymentOutcome unknown

The bank’s ledger

key 7f3a9c1 payment

Attempt 1 began paying a claim when the engine died, leaving the outcome unknown. Attempt 2 sends the same actKey and pays, while the bank’s ledger shows one payment.
  1. How a run recovers after a crash

    When a run resumes, the function replays from the top and receives saved results for finished steps, repeating only work since the last save.

  2. What “once” actually means

    Messages, answers, and started processes are taken exactly once. Each act receives an actKey that survives retries and renames, so outside work happens once when that system respects the key.

  3. Long waits and deadlines

    A wait pauses a run for minutes or months without keeping anything in memory. You can back off retries with longer delays, cap each attempt’s duration, or put a deadline on any section.

  4. Changing code while runs are active

    Processes declare whether active runs move to new code, finish on their starting version, or stop for a person. A pre-deploy check reports each unfinished run’s outcome without running code, and the engine follows it; declared renames keep their history.

  5. No separate server to run

    Trestle runs over SQLite or Postgres, including behind PgBouncer under a role with no create privileges. It works on Node, browsers, Web Workers, and edge runtimes, with guides for single machines, containers, Cloudflare, AWS Lambda, and Google Cloud Run.

What stays yours to keep safe

Your visit is running on Trestle.

This is the real Trestle engine running a live process in your browser tab, not a simulation. Each of the eight topic pages you open answers its question once, showing the path you have taken and the pages you have not opened yet—until you copy npm create @trestlerun to finish it.