Skip to content

docs: show the three-channel protocol split - #5

Merged
rickstaa merged 4 commits into
mainfrom
rs/protocol-diagram
Aug 19, 2026
Merged

docs: show the three-channel protocol split#5
rickstaa merged 4 commits into
mainfrom
rs/protocol-diagram

Conversation

@rickstaa

Copy link
Copy Markdown
Member

The protocol split is easy to forget and is core to driving the runner, but it was a four-item bullet list halfway down How it's wired.

Input, output and prompt control are three separate channels: frames go up a WebSocket, frames come back down a plain HTTP response, and the prompt is a third call that touches neither.

Channel Endpoint Carries
Input WS /api/ws/{uuid} control messages plus input JPEG frames
Output GET /api/stream/{uuid} MJPEG out (multipart/x-mixed-replace)
Prompt POST /api/blending prompt updates, at any time
Liveness GET /api/queue the runner's health_url, polled by the orchestrator

Two consequences now stated rather than implied: opening the output stream is what builds the pipeline and compiles the TensorRT engines, so nothing happens until you GET it; and the shared {uuid} makes input and output one session in two directions, not a request and a response.

A mermaid sequence diagram sits above the table showing the same thing over time: the orchestrator health-polls the app, reserve_session hands back a proxied url and starts the meter, and everything after that is the app's own protocol with the orchestrator only forwarding. That is the property the repo exists to demonstrate, and it was previously only in prose.

Docs only. No behaviour change, and prettier is clean.

rickstaa and others added 4 commits August 19, 2026 14:46
Input, output and prompt control are separate channels, which the prose
buried in a bullet list: frames go up a WebSocket, come back down a
plain HTTP response, and the prompt touches neither. A table names the
channels and a sequence diagram shows the orchestrator only forwarding
once a session is reserved.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A semicolon ends a statement in mermaid, so the note text after it was
read as a new one and the diagram refused to render. Line breaks and
quotes go too, since none of them earn their risk in a note. Verified by
rendering locally rather than by pushing and looking.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The row read "WebSocket + MJPEG", pairing a transport with a payload
format and never mentioning HTTP, though two of the four endpoints are
plain HTTP. Name what each carries, matching how the examples write it.
Registration gains the health poll, which is half of what static means.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Every path shown needed a camera or a clip, so a machine with neither
could not tell a broken stack from a missing /dev/video0. lavfi
synthesises a source, which is also the quickest end-to-end check.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@rickstaa
rickstaa merged commit f635002 into main Aug 19, 2026
1 check passed
@rickstaa
rickstaa deleted the rs/protocol-diagram branch August 19, 2026 15:38
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