Skip to content

Add sample of batch executions #92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 12, 2025

Conversation

shijiesheng
Copy link
Member

What
Add an example on how to batch start activities while holding concurrency limits

Why
Fanout use cases are common in workflows. However, current Cadence server doesn't support batch user cases well. The "correct" way to not bombard the server is to control the concurrency limits of activities so we don't experience lock contentions on mutable states.

Next
We might want to expose some APIs in client like workflow.BatchExecuteActivity so users can easily write scaling workflow code.

})
futures.Send(ctx, workflow.ExecuteActivity(aCtx, BatchActivity, taskID))
}
futures.Close()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind adding a comment explaining what close does here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

@shijiesheng shijiesheng merged commit 02594b0 into cadence-workflow:master May 12, 2025
1 check passed
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.

2 participants