@@ -13,25 +13,28 @@ import "google/protobuf/empty.proto";
1313
1414// EXPERIMENTAL. Subject to redesign or removal.
1515// Sent on workflow and activity polls. Presence means this worker can serve
16- // sessions, where the current implementation of sessions = sticky activities.
16+ // sessions. Currently, the only supported Session type is Workflow Session
17+ // (aka Workflow-as-Session). A Workflow Session can receive both workflow
18+ // tasks and activity tasks of an execution.
1719message WorkerSessionOptions {
1820 // Admission control, if unset the worker accepts an arbitrary number of
1921 // sessions (bounded by session slots in the future)
2022 oneof admission {
21- // The expectation is that this is set for the AgentCore use case.
22- // SDK-side, if this is specified, the worker *only* sticky polls.
23+ // If specified, the worker only polls for work belonging to its session.
2324 SingleSessionOptions single_session = 1 ;
2425 }
2526}
2627
2728// EXPERIMENTAL. Subject to redesign or removal.
28- // Serve exactly one workflow for the worker's lifetime, including across
29+ // Serve exactly one session for the worker's lifetime, including across
2930// process restarts with the same stable_identity. The server binds the worker
30- // to the first workflow task it hands out , and dispatches no other work here,
31- // even after that workflow completes.
31+ // to the first session that needs a worker , and dispatches no other work here,
32+ // even after that session completes.
3233message SingleSessionOptions {
3334 // Identity the binding is stored under. Reuse it across restarts of the
34- // same session, not across concurrently running workers.
35+ // same session, not across concurrently running workers. If multiple
36+ // workers poll with the same stable_identity concurrently, the server
37+ // treats them as pollers of a single worker and process affinity is lost.
3538 //
3639 // Note: this effectively acts as a configurable sticky queue.
3740 // Note: we are currently unsure how this will evolve. May be deprecated as
@@ -41,13 +44,13 @@ message SingleSessionOptions {
4144
4245// EXPERIMENTAL. Subject to redesign or removal.
4346// Resolved activity placement. Unset = normal task-queue routing.
44- // workflow_session requires the activity's task queue to be the workflow's,
45- // and the workflow's worker to serve sessions.
4647message ActivitySessionOptions {
4748 oneof placement {
48- // Run on the workflow's current worker (its sticky queue).
49+ // Run in the workflow's current session (on its sticky queue).
50+ // Currently requires the activity's task queue to be the workflow's,
51+ // and the workflow's worker to serve sessions.
4952 google.protobuf.Empty workflow_session = 1 ;
5053
51- // Future: string stable_identity = 2; (target a named worker)
54+ // Future: references to other types of sessions.
5255 }
5356}
0 commit comments