How a self-calling calculator function distributes its sub-tasks across task groups while keeping each step a durable checkpoint.
Parse an arithmetic expression into a tree, then recursively dispatch each sub-expression to a worker pool and the operator to a separate pool. Every sub-expression is its own durable promise, so partial results survive crashes and the recursion is plain Python.
How a Server Action and a status route share a durable promise id so the page can poll for completion without holding the request open.
A Next.js Server Action kicks off a 4-step background workflow keyed by a report id; a separate API route resolves the same id to poll for completion. The workflow and the status route share one in-process Resonate registry.
How a 15-line generator workflow produces mutual exclusion across workers without signals, lock workflows, or external coordination.
Serialize N workers around a shared resource without a lock workflow or signal channel. A generator that yields each worker in a for-loop IS the mutex; the SDK handles crash recovery and retry.
How a two-step money-transfer saga is exposed over HTTP with two layers of idempotency and crash-recoverable replay.
Move funds between two accounts as a debit + credit saga, triggered by an Express POST and made durable by Resonate. Idempotency is enforced at the execution id and at the ledger row.
How a single recursive function plus durable-promise IDs gives you distributed computation and a permanent result cache in one shape.
Compute factorial(n) by having one function call itself across a worker group. Each call pairs with a durable promise keyed by n, so previously computed results return without recomputing.
How three sequential LLM agents become four lines of generator code when every yield is a Resonate checkpoint.
Coordinate researcher, writer, and reviewer agents in sequence. Each agent handoff is a durable checkpoint, so a failure mid-pipeline retries only the failed agent — completed agents are not re-run.
Two stdio MCP servers — weather forecast and invoice approval — each backed by a registered Resonate generator workflow.
Wrap a Resonate workflow behind a stdio MCP server so an AI client can call it as a tool. Each tool invocation runs as a durable execution with replay, retry on throw, and durable timers.
How three sequential LLM calls collapse to three lines of generator code when every yield is a Resonate checkpoint.
Sequence three LLM agents — researcher, writer, reviewer — through one generator workflow. Each `yield* ctx.run(...)` is a durable checkpoint, so a mid-pipeline failure retries only the failed agent.
Three remote-invocation shapes — rfc, detached, rfi — across a Flask gateway and nine Python service groups, with crash recovery.
Cross-process function calls survive node crashes when the call graph is a durable promise. The example shows await-chain, detached-chain, and fan-out flows in Python using rpc, rfc, rfi, and detached.
How the same recursive fan-out / fan-in workflow runs across six deployment shapes in three languages.
A recursive LLM agent that decomposes a topic into subtopics and dispatches a fresh durable workflow per subtopic, with six sibling variants spanning plain Node, Cloudflare Workers, Google Cloud Functions, Supabase Edge Functions, Python, and Rust.
How a workflow suspends on a latent durable promise and resumes when an HTTP handler resolves it by ID.
Block a Resonate workflow on human approval for an indefinite duration. The workflow awaits a latent durable promise; an HTTP gateway resolves it from outside, and the suspension survives worker crashes.
How a chain-triggered off-chain workflow checkpoints every step through ctx.run and resumes from the last completed child on replay.
A blockchain event triggers a multi-step off-chain workflow whose every step is a durable child promise. The orchestrator is a generator function; each child is registered separately on a named worker group.
How an axum gateway dispatches durable work to a worker pool and lets clients poll a non-blocking status endpoint.
Accept an HTTP request, dispatch durable work to a separate worker process, and let the client poll for completion. The gateway holds no state; Resonate keeps the promise alive across worker crashes and restarts.
How a Stripe-style payment webhook becomes exactly-once when the event_id is the durable promise id and each step is a checkpoint.
Process Stripe-style payment webhooks exactly once by using the event_id as the Resonate promise id. Retries from the provider reattach to the existing durable execution instead of triggering a second charge.
How a user session lifecycle is expressed as a single generator function when each step is a Resonate durable checkpoint and the idle timer survives crashes.
Model a user session as a long-running generator: login, per-activity checkpoints, durable idle timeout, and cleanup. Crashes resume mid-lifecycle without re-recording earlier activities or restarting the timer.