Repository navigation
Sticky activity session options #885
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
base: main
Are you sure you want to change the base?
Changes from all commits
b23db7b
c28c289
7132c51
be0506d
d59dfca
01c117a
6811161
c561d0b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| syntax = "proto3"; | ||
|
|
||
| package temporal.api.session.v1; | ||
|
|
||
| option go_package = "go.temporal.io/api/session/v1;session"; | ||
| option java_package = "io.temporal.api.session.v1"; | ||
| option java_multiple_files = true; | ||
| option java_outer_classname = "MessageProto"; | ||
| option ruby_package = "Temporalio::Api::Session::V1"; | ||
| option csharp_namespace = "Temporalio.Api.Session.V1"; | ||
|
|
||
| // EXPERIMENTAL. Subject to redesign or removal. | ||
| // Configures a worker's polling for sessions that keep workflow and activity | ||
| // tasks on a stable worker destination. Activities opt into session routing | ||
| // through ActivitySessionOptions on their scheduling commands. | ||
| message WorkerSessionOptions { | ||
| oneof isolation { | ||
| SingleSessionOptions single_session = 1; | ||
| } | ||
| } | ||
|
|
||
| // EXPERIMENTAL. Subject to redesign or removal. | ||
| // Dedicates a sticky destination to the first workflow matched to it. | ||
| // Workflow sticky polls may be forwarded to the normal queue until the first | ||
| // workflow task is dispatched. The server persists that workflow ID and does | ||
| // not forward subsequent polls, including after workflow completion. | ||
| // Activity sticky polls are never forwarded to the normal queue. | ||
| message SingleSessionOptions { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thomas: says that maybe we should think about what this is called if we wanna ActivitySessionOptions
|
||
| // Stable sticky task queue name, shared by workflow and activity polls. | ||
| // Reuse this value across worker restarts within the same session, but not | ||
| // across concurrently running workers. This is distinct from worker identity. | ||
| // The SDK must also set the polled sticky task queue's name to this value. | ||
| string stable_identity = 1; | ||
| } | ||
|
|
||
| message ActivitySessionOptions { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i envision these options to be sent on the command attributes when we are going to schedule an activity task -- if that is the case, i wonder if we should have something defined or thought of for the stable identity piece (single session isolation) given that we seem to have thought this in the poll request structures if not, then i wonder if we do even need the single session options defined in the general WorkerSessionOptions |
||
| oneof session { | ||
| // Execute this activity as part of its workflow's session. | ||
| // Currently routes to the workflow's sticky task queue when true. | ||
| bool use_workflow_session = 1; | ||
|
|
||
| // later session_id, etc | ||
| } | ||
| } | ||
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.
should we also have a boolean for use_workflow_session here?