Skip to content

feat: port the shared-memory transport onto the WorkerChannel abstraction#28

Draft
mdashti wants to merge 2 commits into
moe/embedder-apifrom
moe/shm-on-protocol-grpc
Draft

feat: port the shared-memory transport onto the WorkerChannel abstraction#28
mdashti wants to merge 2 commits into
moe/embedder-apifrom
moe/shm-on-protocol-grpc

Conversation

@mdashti

@mdashti mdashti commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

This PR ports our shared-memory ("shm") transport onto the WorkerChannel abstraction.

It's the third layer: it stacks on the embedder-API PR (#29), which stacks on the transport-completion PR (#27). The base here is the embedder-API branch, so the diff is only src/shm/* plus the mod shm declaration and its two Cargo deps. The transport plugs in with no core changes, which is the point.

What

src/shm/* (rings, DSM, mesh, framing) moves over verbatim. The old ShmMqWorkerTransport: WorkerTransport + ShmMqWorkerConnection: WorkerConnection become ShmChannelResolver: ChannelResolver + a ShmWorkerChannel: WorkerChannel: execute_task reads the rings keyed off the task; coordinator_channel is a no-op that drains its input, since pg_search delivers plans over DSM, not over the channel.

Verified

The in-crate in_process test runs real distributed queries through the shm rings (gather, shuffle, early-cancel, producer-loss), 4/4 green in both feature configs, and it runs under the no-gRPC CI job inherited from the transport-completion PR. self_hosted is deferred and gated out; its no-gRPC-default role is the in-process transport's and its ring safety-net role is this test.

Consumed by

pg_search runs its MPP on this transport (paradedb#5448), which is what exercises it end to end.

@mdashti mdashti force-pushed the moe/shm-on-protocol-grpc branch from 5b1d213 to 9e7210d Compare June 30, 2026 01:50
@mdashti mdashti changed the base branch from moe/protocol-grpc-shm to moe/embedder-api June 30, 2026 01:51
@mdashti mdashti force-pushed the moe/embedder-api branch from 1728fb5 to 328e142 Compare June 30, 2026 02:12
@mdashti mdashti force-pushed the moe/shm-on-protocol-grpc branch from 9e7210d to 992673d Compare June 30, 2026 02:12
mdashti added 2 commits July 1, 2026 11:47
The shm ring/DSM/mesh/framing core moves verbatim from the fork; the old
WorkerTransport umbrella is gone, so the resolver hands out a channel and
execute_task reads the rings per partition. The mesh is the no-gRPC
transport, so it builds in both the grpc-on and grpc-off configs.
ShmWorkerChannel::coordinator_channel now ships each stage's
SetPlanRequest to the worker proc that owns its task, as a SetPlan frame
the worker takes with take_set_plan, so the embedder no longer routes
plans out of band.
@mdashti mdashti force-pushed the moe/embedder-api branch from 328e142 to 3439f34 Compare July 1, 2026 23:15
@mdashti mdashti force-pushed the moe/shm-on-protocol-grpc branch from 992673d to ea63b5e Compare July 1, 2026 23:15
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.

1 participant