-
Notifications
You must be signed in to change notification settings - Fork 57
Add sample for scheduling over multiple executors #112
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
Conversation
|
@microsoft-github-policy-service agree |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a sample demonstrating how to schedule durable tasks across multiple executors in a polyglot environment. The implementation provides a RoutingExecutor that enables manual task routing to different executors (local and gRPC-based) while sharing the same backend storage.
Key Changes:
- Introduces
RoutingExecutorcustom executor for routing tasks based on configuration - Demonstrates coordination between local and gRPC executors with distinct capabilities
- Provides a working example orchestrator that delegates activities to appropriate executors
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2c441c2 to
522cd50
Compare
- Refactor RoutingExecutor and initExecutor for better modularity and readability. - Export Config and RoutingExecutor fields to align with Go conventions. - Improve lifecycle management of gRPC server and client connections using context. - Fix Shutdown logic to properly handle errors from multiple executors. - Add comprehensive documentation comments for key types and methods. - Use grpc.DialContext with WithBlock() for more reliable connection initialization.
22d6be4 to
66a95c8
Compare
|
@cgillum All the comment reviews have been resolved.
|
cgillum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution!
This pull request demonstrates a potential solution for executing durable tasks in a polyplotly environment.
To use durable tasks across multiple programming languages where workers connected to the same executor must have identical capabilities,
RoutingExecutoris introduced. This custom executor enables manual scheduling of tasks to different executors while sharing the same backend.The sample creates a
RoutingExecutorcoordinates tasks between a local executor and a gRPC-based executor, each with distinct capabilities. By doing so, the orchestrator can efficiently delegate tasks to the appropriate executors based on their capabilities, ensuring seamless collaboration.This approach allows to manage and execute tasks in a distributed environment while maintaining flexibility in how different programming languages or systems interact under the same durable task framework.