Uh oh!
There was an error while loading. Please reload this page.
Add Nexus worker service for server-to-worker commands - #708
Conversation
4b2e0d1 to
54edb8eCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
afb40a2 to
b920471Compareb920471 to
84c0bacCompare
cretz
left a comment
There was a problem hiding this comment.
LGTM, though would want to see end-to-end working including in an SDK if possible before approving
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
84c0bac to
28ea1ddCompare7d3bfb7 to
e0d0049CompareThis enables the server to track which worker is executing eager-dispatched activities, allowing activity cancellation to be routed correctly.
61952c9 to
98350a9Comparee0d0049 to
6c21af4Compare
bergundy
left a comment
There was a problem hiding this comment.
LGTM, don't merge this until you've generated the code and verified that this API works across SDK and server.
There will probably be a separate code generation project that will construct the YAML from protos to prevent the need to define services in separate places but this is a good start IMHO.
cretz
left a comment
There was a problem hiding this comment.
This is our first Nexus service, so lots of things undecided. I added comments, but would like to hear others' opinions.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
37ffb33 to
6c21af4CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Made-with: Cursor
32523fb to
cfff488Compare…nstance-key-to-wft-complete
…comment Made-with: Cursor
…vity-cancel Made-with: Cursor
- Rename WorkerCommandsRequest/Response to ExecuteCommandsRequest/Response to match the operation name (bergundy feedback) - Change operation name from executeCommands to ExecuteCommands (PascalCase) - Add doc: results list must be 1:1 with commands list (Sushisource feedback) Made-with: Cursor
Move WorkerCommand, CancelActivityCommand, WorkerCommandResult, and CancelActivityResult to temporal.api.worker.v1 as top-level messages. request_response.proto now only contains ExecuteCommandsRequest and ExecuteCommandsResponse, following the repo convention. (bergundy feedback) Made-with: Cursor
bergundy
left a comment
There was a problem hiding this comment.
Just one comment on the location of the schema file.
Uh oh!
There was an error while loading. Please reload this page.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Removed comment about service definition in request_response.proto.
Uh oh!
There was an error while loading. Please reload this page.
## Summary Defines a Nexus service for server-to-worker communication, starting with activity cancellation support. ## Design Decision We chose a **generic command API** (`ExecuteCommandsRequest` with `oneof` command types) instead of a cancel-specific API. This allows a future optimization to batch multiple commands (cancel, pause, etc) in a single request and deliver to a worker in one RPC. ## Files - `temporal/api/nexusservices/workerservice/v1/request_response.proto` - request response definitions - `nexus-rpc/temporal-proto-models-nexusrpc.yaml` - Nexus service definition ## Related - [Server PR](temporalio/temporal#9233) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Defines a Nexus service for server-to-worker communication, starting with activity cancellation support.
Design Decision
We chose a generic command API (
ExecuteCommandsRequestwithoneofcommand types) instead of a cancel-specific API. This allows a future optimization to batch multiple commands (cancel, pause, etc) in a single request and deliver to a worker in one RPC.Files
temporal/api/nexusservices/workerservice/v1/request_response.proto- request response definitionsnexus-rpc/temporal-proto-models-nexusrpc.yaml- Nexus service definitionRelated