Temporal's sleep-for-days races a 30-day timer against a signal channel via NewSelector. Resonate's equivalent is ctx.Sleep(d) + f.Await(nil) — Selector gone, durability kept.
Port Temporal's sleep-for-days sample to Resonate. The timer leg of the Selector loop maps to ctx.Sleep(d) + f.Await(nil); crash recovery resumes on the remaining time, not from zero.
The durable-loop-of-ticks pattern — ctx.RPC then ctx.Sleep each iteration — replaces workflow.ExecuteActivity + workflow.NewTimer + NewSelector with two two-liners per tick.
A durable loop of ctx.RPC + ctx.Sleep ticks that resumes at the next pending tick after a crash; maps structurally to Temporal's sleep-for-days, timer, and cron samples.
How an AI-vs-AI chess match becomes a generator on a serverless function — durable, bounded in replay, recursive across games via ctx.detached.
Two AI players take turns through a generator function on a Cloud Function. Each move is a durable checkpoint, each pause is a durable sleep, and a detached tail call re-roots the workflow after every game so replay scope stays bounded forever.
How `ctx.sleep` collapses long-lived waits into one line by suspending the workflow against a durable timer promise.
Suspend a workflow for seconds, days, or years without holding a process open. The sleep is a server-backed timer promise; another worker resumes the workflow when the timer fires, even if the original worker is gone.
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 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.
How an infinite monitoring loop, an LLM call per story, and an in-memory deduplication set survive process restarts without an external state store.
A continuous LLM-driven monitor that scans Hacker News, scores stories for relevance, and notifies on findings. Each step is a durable checkpoint and the deduplication set rebuilds itself from the promise store on restart.
How `ctx.sleep` collapses long-lived waits into one yield by suspending the workflow against a durable timer promise.
Suspend a generator workflow for seconds, days, or years without holding a process open. The sleep is a server-backed timer promise; any worker in the group resumes the workflow when the timer fires.
How an unbounded health-check loop stays durable across step failures using ctx.run plus ctx.sleep, with no periodic history-reset step.
A health monitor that loops forever — check services, alert, sleep, repeat. The loop is a plain while; each iteration is a Resonate checkpoint, each pause is a durable sleep, and there is no history-size limit to reset by hand.
How a long-running keyword-monitoring agent collapses to a generator workflow when every yield is a durable checkpoint and the promise store IS the state store.
Continuously scan Hacker News, score each story with an LLM, and notify on hits — without re-analyzing stories after a crash. Every step is a Resonate checkpoint and the dedup set rebuilds on replay, so no external database is needed.
How one durable-sleep workflow runs on Lambda, Workers, Cloud Functions, Edge Functions, Kafka, browsers, and Python without changing the function body.
A countdown loop that sleeps between steps and survives crashes, shown across 8 deployment shapes. The workflow body is one generator; only the platform adapter changes.
How an MCP server returns a promise id instead of blocking, and lets the agent ask back later — backed by a Resonate-registered function and a durable sleep.
Expose a long-running job to an LLM as an MCP tool that returns a promise id immediately, then let the agent poll for completion against a durable promise on the Resonate server.
How a for-loop with ctx.sleep between calls becomes a crash-safe per-workflow rate limiter with no external token bucket.
Send N API calls at a fixed rate using ctx.sleep between calls. The sleep is a durable checkpoint, so a crash mid-batch resumes at the next request without duplicating earlier ones and without bursting after restart.
How `ctx.sleep` collapses long-lived waits into one yield by suspending the workflow against a durable timer promise.
Suspend a workflow for seconds, days, or years without holding a Python process open. The sleep is a server-backed timer promise; another worker resumes the workflow when the timer fires, even if the original worker is gone.
How an autonomous agent loop with a long-lived sleep step collapses to straight-line generator code when each yield is a durable checkpoint.
An LLM-driven reminder assistant that parses a natural-language request, picks a target timestamp, and sleeps until then before sending the reminder. The sleep is a durable timer, so no cron, queue, or database is needed.
We use strictly necessary cookies to run this site. With your consent we also use Google Analytics to understand traffic. We do not load analytics until you choose to allow it. Privacy Policy.