Skip to content

realtime: no WS/SSE transport — service-realtime is in-process only and clients long-poll; big-screen/command-center scenarios need real push #8347

Description

@os-zhuang

Status

Maintainer decision (2026-08-13): scheduled for v18.

Current state (all honestly reported, per ADR-0076 D12)

  • packages/runtime/src/http-dispatcher.ts:1441-1444 — capability discovery hard-codes websockets: { enabled: false }: "No WS/HTTP realtime surface is mounted anywhere — a mere in-process realtime service must not advertise websockets" (ADR-0076 D12, ADR-0076: remaining objectql/protocol layering work (cross-repo window) #2462).
  • packages/services/service-realtime/ — in-memory, in-process pub/sub adapter only; no transport.
  • packages/client/src/realtime-api.ts — long-polling placeholder; header comments: "For production WebSocket/SSE support, extend with transport adapters" / "WebSocket/SSE transport planned for future".
  • The one live "near-realtime" mechanism is dashboard polling: dashboard.refreshInterval (seconds) is confirmed live in the objectui renderer (packages/spec/liveness/dashboard.jsonDashboardRenderer.tsxsetInterval(onRefresh)).

Why now

Solution scoping for an overseas port/terminal customer (2026-08): a command-center big screen showing gate traffic, yard inventory, and berth/operation status. 5–30s refreshInterval polling covers the baseline, but sub-5s "event hits the screen" (gate pass-through, weighbridge reading) needs push. The same transport would also serve in-app notifications (service-messaging inbox channel) and list-view live updates.

Suggested scope (for discussion)

  1. SSE first — one-directional server→client fits the dashboard/notification cases, avoids WS proxy/auth complexity, and slots behind the existing service-realtime adapter seam.
  2. Client transport adapter replacing the long-poll placeholder in realtime-api.ts (the reserved fields are already stubbed for it).
  3. Flip capability discovery honestly per D12 only when the surface is actually mounted.
  4. Multi-node fan-out: document that horizontal deployments need a shared bus (a service-cluster-redis seam already exists) — single-node in-process bridge is an acceptable first ship.

Related

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions