resonate-recursive-fan-out-pattern-typescript

Orchestrate recursive fan-out for parallel Resonate TypeScript SDK workflows.

6|Updated Jan 8, 2026
One-click install
npx skills add https://github.com/resonatehq/resonate-skills --skill resonate-recursive-fan-out-pattern-typescript
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: resonate-recursive-fan-out-pattern-typescript
Source: https://github.com/resonatehq/resonate-skills/tree/main/resonate-recursive-fan-out-pattern-typescript
Command: npx skills add https://github.com/resonatehq/resonate-skills --skill resonate-recursive-fan-out-pattern-typescript

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Breaks complex work into many parallel subtasks while ensuring work is not duplicated and that execution is balanced across workers, removing the burden of manually coordinating recursion, deduplication, and result aggregation in distributed workflows.

Core Features & Use Cases

  • Fire-and-forget parallelism using ctx.detached to spawn independent child workflows.
  • Parallel RPC and result gathering using ctx.beginRpc to collect and reduce results from many subtasks.
  • Deterministic deduplication via promise IDs to ensure identical subtasks run exactly once.
  • Bounded and dynamic fan-out patterns to rate-limit, batch, or let children decide whether to spawn grandchildren.
  • Common applications: web crawling and scraping, recursive data aggregation, map-reduce jobs, tree traversal, and distributed research agents.

Quick Start

Spawn a recursive fan-out that crawls followers to depth 3 using deterministic promise IDs and a batch size of 10 to avoid overwhelming external services.

Frequently Asked Questions about resonate-recursive-fan-out-pattern-typescript

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent duplicate work when running recursive fan-out tasks in parallel?

Deterministic deduplication in recursive fan-out is achieved by assigning unique promise IDs to each subtask, ensuring identical parallel tasks execute exactly once and preventing redundant distributed workflow operations.

How do I spawn independent child workflows without blocking the parent task?

Fire-and-forget parallelism uses detached execution to spawn independent child workflows, allowing the parent process to continue recursively fanning out new tasks without waiting for child completion or blocking the queue.

Can I rate-limit parallel web crawling to avoid overwhelming external services?

Bounded and dynamic fan-out patterns apply rate-limiting and batching to parallel web crawling workflows, constraining recursive task spawning with configurable batch sizes to prevent overwhelming external APIs.

What is the best way to collect and reduce results from parallel subtasks in a distributed workflow?

Parallel RPC primitives gather and reduce results from many distributed subtasks by initiating remote procedure calls, allowing the parent workflow to collect and aggregate responses from parallel fan-out executions.

Does this fan-out pattern support map-reduce jobs and tree traversal in TypeScript?

Recursive fan-out patterns orchestrate parallel map-reduce jobs and tree traversal workflows in TypeScript, breaking complex data aggregation into balanced subtasks while automatically coordinating recursion and result collection.

When should I use dynamic fan-out instead of bounded fan-out for distributed scraping?

Dynamic fan-out lets child workflows decide whether to spawn grandchildren based on runtime data, while bounded fan-out applies strict rate limits and batch sizes, making dynamic patterns suited for unpredictable distributed scraping depths.