Cast binary file transfer

Resource Server → Image Display: POST multipart files to the hub, WebSocket metadata fan-out, then GET payload bytes. Click the diagram to play each step (five steps plus restart).

Your browser cannot display this interactive SVG. Open the SVG directly.

Steps: multipart POST · hub stores payloadIds · WebSocket notify · GET file bytes · payload TTL expires.

Cast carries imaging files (DICOM, NIfTI, PNG, NRRD, and similar) through a Cast hub without putting raw bytes on the WebSocket. The hub is a router with a short-lived in-memory file store—not a PACS or long-term archive.

Two steps for every file:

  1. Notify — Publisher sends metadata (and uploads bytes) over HTTP. The hub fans out one text-only WebSocket message listing payloadIds[] per file.
  2. Download — Each subscriber pulls bytes when ready via GET /api/hub/payloads/{payloadId}, reassembles chunks, and attaches the full file to event.context.files[].

Full write-up: binary-file-transfer.md · Auto-play loop SVG in repo: rs-to-id animated