Skip to content

[Compute Separation] M2: ConnectedWorkerChannel + channel manager + invocation dispatcher #11643

@brettsam

Description

@brettsam

New channel type for externally-connected workers. Inherits WorkerChannelBase — no process management. The gRPC stream IS the worker lifecycle.

Dependencies: M1 (#11641)

Deliverables

File Purpose
ExternalWorkers/ConnectedWorkerChannel.cs Channel subclass — no IWorkerProcess, no process spawn/terminate
ExternalWorkers/ConnectedWorkerChannelFactory.cs Creates ConnectedWorkerChannel instances
ExternalWorkers/IConnectedWorkerChannelManager.cs Interface with AddChannel, GetChannels, WaitForChannelAsync, ShutdownChannelAsync
ExternalWorkers/ConnectedWorkerChannelManager.cs Implementation with TaskCompletionSource-based WaitForChannelAsync
ExternalWorkers/ConnectedWorkerInvocationDispatcher.cs IFunctionInvocationDispatcher that routes to connected channels, no restart logic

Acceptance Criteria

  • ConnectedWorkerChannel can be constructed and processes the gRPC protocol identically to GrpcWorkerChannel (minus process lifecycle)
  • WorkerProcess returns null, WorkerProcessId returns -1
  • ConnectedWorkerChannelManager.WaitForChannelAsync() blocks until a channel is added, with configurable timeout
  • ConnectedWorkerInvocationDispatcher routes invocations to ready channels
  • RestartWorkerAsync returns false (no-op for external workers)
  • Unit tests for all new classes

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions