Skip to content

Conversation

@nicholas-1vbw
Copy link
Contributor

@nicholas-1vbw nicholas-1vbw commented Dec 19, 2025

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, RoutingExecutor is introduced. This custom executor enables manual scheduling of tasks to different executors while sharing the same backend.

The sample creates a RoutingExecutor coordinates 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.

@nicholas-1vbw
Copy link
Contributor Author

@microsoft-github-policy-service agree

Copy link

Copilot AI left a 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 RoutingExecutor custom 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.

@nicholas-1vbw nicholas-1vbw force-pushed the heterogeneous branch 2 times, most recently from 2c441c2 to 522cd50 Compare December 20, 2025 03:38
- 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.
@nicholas-1vbw
Copy link
Contributor Author

@cgillum All the comment reviews have been resolved.

  • 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.

Copy link
Member

@cgillum cgillum left a 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!

@cgillum cgillum merged commit a1e5ef0 into microsoft:main Dec 22, 2025
3 checks 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