Skip to content

docs(operations): document nesting type observability trade-offs#194

Open
lyushher wants to merge 2 commits into
aws:mainfrom
lyushher:main
Open

docs(operations): document nesting type observability trade-offs#194
lyushher wants to merge 2 commits into
aws:mainfrom
lyushher:main

Conversation

@lyushher
Copy link
Copy Markdown

Fixes #188

Added documentation for NestingType.NESTED and NestingType.FLAT in both parallel.md and map.md.

Changes:

  • Explain how NESTED preserves child operations as separate scopes in execution history
  • Explain how FLAT reduces overhead by flattening child operations into the parent operation
  • Document the observability trade-offs between the two modes
  • Add guidance on when each option may be preferred

@yaythomas
Copy link
Copy Markdown
Contributor

hi @lyushher, thank you so much for contributing!

We can't merge this yet, because this feature is still in alpha in the TS/JS SDK, so it's not actually published yet. We only update the docs on actual release, not on alpha/preview.

So this PR will be on hold until then.

With that said, when the time comes to publish this, here also some suggested active voice wording (per contribution guide here https://github.com/aws/aws-durable-execution-docs/blob/main/authoring-guide.md#voice-and-tone) for parallel:

    - `nesting` (optional) `NestingType.NESTED` (default) or `NestingType.FLAT`.
        - With `NESTED`, the parallel operation wraps each branch in its own child context with
            its own CONTEXT operation, so every branch appears as a separate
            operation in the execution history. Use `NESTED` when you want to
            inspect each branch's operations independently.
        - With `FLAT`, the parallel operation uses a virtual context for each branch and skips
            the per-branch CONTEXT operation, so branches no longer appear as
            separate operations in the execution history. `FLAT` reduces operation
            overhead by ~30% and raises the maximum-branches ceiling. Use `FLAT`
            for high-volume workloads where per-branch visibility matters less
            than operation overhead.

For map.md, same wording with branch(es) → iteration(s) and maximum-branches → maximum-iterations.

This update also only covers TS, but not the Python/Java changes, and ideally these should go in at the same time.

Also, please check the authoring guide
https://github.com/aws/aws-durable-execution-docs/blob/main/CONTRIBUTING.md#formatting, it really helps regularize the markdowns if we run mdformat on them to prepare PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

[docs]: Explain NestingType for Parallel and Map including observability trade-offs.

2 participants