Skip to content

feat: add an in-process worker transport (no gRPC)#27

Open
mdashti wants to merge 3 commits into
upstream-main-e05109bfrom
moe/protocol-grpc-shm
Open

feat: add an in-process worker transport (no gRPC)#27
mdashti wants to merge 3 commits into
upstream-main-e05109bfrom
moe/protocol-grpc-shm

Conversation

@mdashti

@mdashti mdashti commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Ticket(s) Closed

N/A

What

This PR makes the WorkerChannel abstraction usable by a transport that is not gRPC, and adds the in-process reference transport that proves it. Mirrored upstream as datafusion-contrib#548.

Why

datafusion-contrib#512 abstracted the worker protocol, but gRPC stayed the only implementation and the proto sat behind the grpc feature, so nothing built or ran without it.

How

One commit per concern, each with its own test:

  • Moved the prost types out from behind grpc. Only the tonic client and server stay gated, and the generator emits those gates.
  • Decoupled the benchmarks dev-dependency (it re-unified grpc into every test build) and added a unit-test-no-grpc CI job that runs the whole lib suite with the feature off.
  • InProcessChannelResolver: routes the three protocol methods to a co-located Worker. No gRPC, no IPC, no serialization round trip.
  • metrics_store() with a public insert, and a no-gRPC decode_task_metrics: a driver whose transport returns metrics out-of-band files the decoded frames into the store the EXPLAIN rewrite reads.

Tests

The in-process transport runs a distributed GROUP BY end to end with grpc off in CI, and a unit test pins the metrics frame-to-store path.

Stack

The dispatch and routing extension points a push transport needs are on top of this (#31); the shared-memory transport is on top of that (#28), and its diff is only src/shm/*.

@mdashti mdashti force-pushed the moe/protocol-grpc-shm branch from deb340e to 02ff23b Compare June 30, 2026 02:12
@stuhood stuhood self-assigned this Jul 6, 2026
@stuhood stuhood force-pushed the gabrielmusat/abstract-grpc branch from fa78bca to c814a9c Compare July 6, 2026 17:29
@stuhood stuhood force-pushed the moe/protocol-grpc-shm branch 2 times, most recently from 3d4c5d8 to c46b2e3 Compare July 6, 2026 17:45
@mdashti mdashti force-pushed the moe/protocol-grpc-shm branch from c46b2e3 to f07eb09 Compare July 9, 2026 21:32
@mdashti mdashti changed the base branch from gabrielmusat/abstract-grpc to upstream-main-e05109b July 9, 2026 21:33
@paradedb paradedb deleted a comment from CLAassistant Jul 9, 2026
@mdashti mdashti force-pushed the moe/protocol-grpc-shm branch 2 times, most recently from 903cd33 to 9270c0f Compare July 9, 2026 23:34

@mdashti mdashti left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing self-revew now.

mdashti and others added 3 commits July 9, 2026 17:06
The prost message types carry no tonic dependency, so a transport that is
not gRPC can speak the same wire shape without pulling in the gRPC stack.
Only the tonic client and server stay gated; the generator emits those
gates so a regeneration cannot drop them. tonic-prost feeds only the
generated client and server, so it moves behind the feature too.

Co-authored-by: Stu Hood <stuhood@gmail.com>
The benchmarks crate's dev-dependency on the lib re-unified grpc into
every test build, so a genuine no-gRPC test run was impossible; the
dataset suites move into the benchmarks crate and the gRPC-coupled test
utilities gate behind grpc. A unit-test-no-grpc job then runs the whole
lib suite with the feature off.

Co-authored-by: Stu Hood <stuhood@gmail.com>
InProcessChannelResolver routes the three protocol methods straight to a
co-located Worker, with no gRPC, no IPC, and no serialization round-trip:
the reference implementation of the protocol for a co-located worker, and
the first transport that exercises the abstraction with grpc off. Its
end-to-end test (a distributed GROUP BY across tasks) runs under the
no-gRPC CI job.

Co-authored-by: Stu Hood <stuhood@gmail.com>
@mdashti mdashti force-pushed the moe/protocol-grpc-shm branch from 9270c0f to 9940349 Compare July 10, 2026 00:17
@mdashti

mdashti commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator Author

This is now on-par with the upstream PR: datafusion-contrib#548

@mdashti mdashti force-pushed the moe/protocol-grpc-shm branch 2 times, most recently from be44b9c to 0dfe291 Compare July 10, 2026 03:24
@mdashti mdashti marked this pull request as ready for review July 10, 2026 03:35
@stuhood stuhood force-pushed the moe/protocol-grpc-shm branch from 0dfe291 to 36af89b Compare July 10, 2026 23:50
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.

2 participants