Tag

#rust

10 posts

Resonate brand card on a dark background with an ember spectrum wave at the bottom and the post headline in white Sansation.
4 min readResonate HQJust published

Durable sleep across process crashes in Rust on Resonate

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.

Resonate brand card on a dark background with an ember spectrum wave at the bottom and the post headline in white Sansation.
4 min readResonate HQJust published

Load balancing across worker instances in Rust on Resonate

How a worker group plus a `poll://any@workers` target collapses service discovery, load balancing, and crash recovery into config strings.

Run multiple Rust workers in a named group and dispatch durable RPCs to any one of them. The Resonate Server handles service discovery, load balancing, and recovery; the worker code is one function and a group string.

Resonate brand card on a dark background with an ember spectrum wave at the bottom and the post headline in white Sansation.
4 min readResonate HQJust published

Recursive workflow with cached results in Rust on Resonate

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.

Resonate brand card on a dark background with an ember spectrum wave at the bottom and the post headline in white Sansation.
4 min readResonate HQJust published

Async HTTP API with durable workers in Rust on Resonate

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.

Resonate brand card on a dark background with an ember spectrum wave at the bottom and the post headline in white Sansation.
5 min readResonate HQJust published

Periodic function on a cron schedule in Rust on Resonate

How `resonate.schedule(name, cron, func_name, args)` registers a server-side cron whose ticks become durable promises picked up by any worker in the group.

Run a Rust function on a cron expression where every tick is a durable promise on the server. If a worker crashes mid-tick, another worker in the group resumes the same execution — the tick is not lost.

Resonate brand card on a dark background with an ember spectrum wave at the bottom and the post headline in white Sansation.
4 min readResonate HQJust published

Hello World quickstart in Rust on Resonate

The smallest unit of a Resonate Rust program — a workflow, a leaf function, and a worker — annotated for retrieval.

The minimum durable program in the Resonate Rust SDK: one workflow function, one leaf function, one worker process. Crash the worker mid-run and the execution resumes from the last checkpoint.

Resonate brand card on a dark background with an ember spectrum wave at the bottom and the post headline in white Sansation.
4 min readResonate HQJust published

Durable MCP tool handler in Rust on Resonate

How an MCP tool call dispatches into a Resonate workflow that checkpoints each step and deduplicates by promise ID.

Expose a durable Resonate workflow as a Model Context Protocol tool over stdio. The MCP server stays stateless, the workflow checkpoints each step on a worker process, and concurrent calls for the same input deduplicate by promise ID.

Resonate brand card on a dark background with an ember spectrum wave at the bottom and the post headline in white Sansation.
5 min readResonate HQJust published

Per-message Kafka worker with crash recovery in Rust

How the Rust SDK turns a per-Kafka-message handler into a durable workflow keyed by the message id, with non-blocking dispatch and replay from the last checkpoint.

A Redpanda consumer dispatches one durable Resonate workflow per message and immediately moves on. Each ctx.run is a checkpoint; a crash mid-deletion resumes from the last completed batch, and the record id deduplicates retries.