compute-client: multiplex one command stream across two runtimes - #38388
Draft
antiguru wants to merge 1 commit into
Draft
compute-client: multiplex one command stream across two runtimes#38388antiguru wants to merge 1 commit into
antiguru wants to merge 1 commit into
Conversation
antiguru
force-pushed
the
mh/interactive-03-multiplex
branch
from
August 21, 2026 11:23
92a68e1 to
1db2f7e
Compare
antiguru
force-pushed
the
mh/interactive-03-multiplex
branch
from
August 21, 2026 13:24
1db2f7e to
b6ef7c0
Compare
antiguru
force-pushed
the
mh/interactive-03-multiplex
branch
from
August 21, 2026 13:42
b6ef7c0 to
017ca4b
Compare
antiguru
force-pushed
the
mh/interactive-03-multiplex
branch
from
August 21, 2026 14:31
017ca4b to
92b0861
Compare
A replica running two compute runtimes still speaks one compute protocol to the controller. This adds the multiplexer that fans a single command stream out to both and merges their responses back into one, so neither the controller nor the protocol learns that the replica is split. Routing follows collection identity rather than command kind. Lifecycle commands go to both runtimes, a dataflow goes to the runtime that will host it, and `AllowCompaction` for a maintained collection is broadcast to both because the interactive runtime may be reading a published copy of it. Frontier reports are forwarded only from the runtime that owns the collection, since the controller keeps one frontier stream per collection and two reporters would race and regress it. Peek responses are forwarded verbatim without dedup, because a peek is answered by exactly one runtime. Nothing constructs a multiplexer yet, so the module is inert. Its tests cover the routing table, the broadcast, ownership eviction, and that `recv` loses no message when both sides are ready. Tests are out of line in `multiplex/tests.rs`, per the convention in `src/compute/AGENTS.md`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
antiguru
force-pushed
the
mh/interactive-03-multiplex
branch
from
August 21, 2026 17:54
92b0861 to
c595599
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Third of eight PRs splitting #37770. Stacks on #38387. Tracked by CPU-216.
A replica running two compute runtimes still speaks one compute protocol to the controller. This adds the multiplexer that fans a single command stream out to both and merges their responses into one, so neither the controller nor the protocol learns that the replica is split.
Routing follows collection identity rather than command kind. Lifecycle commands go to both runtimes, a dataflow goes to the runtime that will host it, and
AllowCompactionfor a maintained collection is broadcast to both because the interactive runtime may be reading a published copy of it. Frontier reports are forwarded only from the owning runtime, since the controller keeps one frontier stream per collection and two reporters would race and regress it. Peek responses are forwarded verbatim, because exactly one runtime answers a peek.Inert: nothing constructs a multiplexer. Independent of #38386 and #38387; it sits above them only to keep the stack linear.