Skip to content

Add Batch Processing Patterns category with 4 new patterns#6

Open
joshmsmith wants to merge 3 commits into
temporal-sa:mainfrom
joshmsmith:batch-patterns
Open

Add Batch Processing Patterns category with 4 new patterns#6
joshmsmith wants to merge 3 commits into
temporal-sa:mainfrom
joshmsmith:batch-patterns

Conversation

@joshmsmith
Copy link
Copy Markdown
Contributor

Summary

Adds a new Batch Processing Patterns category to the catalog with an overview page and four fully-documented patterns, each with runnable sandbox samples in TypeScript, Python, Go, and Java.

New patterns

Pattern Description
Overview (batch-processing-patterns.md) Decision table and tile grid helping readers pick the right pattern based on record set size, parallelism model, and rate-control needs
Fan-Out with Child Workflows (fanout-child-workflows.md) Splits a record set into fixed-size chunks and assigns each to an independent child Workflow. Best for record sets up to ~4M items.
Batch Iterator (batch-iterator.md) Processes an unbounded record set one page at a time using Continue-As-New, with configurable per-page rate control.
Sliding Window (sliding-window.md) Maintains a bounded window of concurrently running child Workflows, launching a new one each time one completes.
MapReduce Tree (mapreduce-tree.md) Recursively splits the record set into halves until each leaf processes a small chunk, then aggregates results back up the tree. Maximum parallelism, no rate control.

Sandbox samples

Each pattern ships runnable code in all four SDKs under sandbox-runner/patterns/{batch-iterator,sliding-window,fanout-child-workflows,mapreduce-tree}/. Each directory includes pattern.json, per-language source files, Go build-cache warmup stubs, and Java Maven warmup stubs.

Sidebar

Added a "Batch Processing Patterns" section to docs/.vitepress/config.mts.

Out of scope

The event-accumulator skeleton (sandbox-runner/patterns/event-accumulator/) is not included and will be completed separately.

- batch iterator
- fanout
- mapreduce tree
- sliding window
## Summary

Adds a new **Batch Processing Patterns** category to the catalog with an overview page and four fully-documented patterns, each with runnable sandbox samples in TypeScript, Python, Go, and Java.

## New patterns

| Pattern | Description |
|---|---|
| **Overview** (`batch-processing-patterns.md`) | Decision table and tile grid helping readers pick the right pattern based on record set size, parallelism model, and rate-control needs |
| **Fan-Out with Child Workflows** (`fanout-child-workflows.md`) | Splits a record set into fixed-size chunks and assigns each to an independent child Workflow. Best for record sets up to ~4M items. |
| **Batch Iterator** (`batch-iterator.md`) | Processes an unbounded record set one page at a time using Continue-As-New, with configurable per-page rate control. |
| **Sliding Window** (`sliding-window.md`) | Maintains a bounded window of concurrently running child Workflows, launching a new one each time one completes. |
| **MapReduce Tree** (`mapreduce-tree.md`) | Recursively splits the record set into halves until each leaf processes a small chunk, then aggregates results back up the tree. Maximum parallelism, no rate control. |

## Sandbox samples

Each pattern ships runnable code in all four SDKs under `sandbox-runner/patterns/{batch-iterator,sliding-window,fanout-child-workflows,mapreduce-tree}/`. Each directory includes `pattern.json`, per-language source files, Go build-cache warmup stubs, and Java Maven warmup stubs.

## Sidebar

Added a "Batch Processing Patterns" section to `docs/.vitepress/config.mts`.

## Out of scope

The event-accumulator skeleton (`sandbox-runner/patterns/event-accumulator/`) is not included and will be completed separately.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant