What problem does it solve?
Route handlers in Python web frameworks often need to trigger, await, or resolve long-running durable workflows without embedding business logic or external effects in ephemeral HTTP processes. This Skill clarifies where to place responsibilities (ephemeral routes vs durable workers), how to route RPC and runs to worker groups, and how to use webhooks and promises to bridge external systems and durable functions.
Core Features & Use Cases
- Ephemeral route patterns: submit-and-poll, submit-and-callback (webhook resolves promise), and synchronous wrapping for fast workflows.
- Worker separation and RPC: run durable functions in @resonate.register workers, route RPC to specialized worker groups, and keep external effects inside ctx.run.
- Operational best practices: stable invocation IDs, use of options(target), explicit timeouts for synchronous RPC, and promise-based webhook resolution.
- Use cases: order processing with approval callbacks, async job submission with polling endpoints, and short-running compute endpoints that block for quick results.
Quick Start
Create a FastAPI POST /orders endpoint that begins a Resonate durable workflow with a stable job_id and returns the job_id to the client.