Skip to main content

State 007 Fidelity Profile

This profile captures the required technical shape for state 005-messaging-nats-replacement.

Runtime Stack Deltas From State 003​

ConcernState 003State 007
Messaging backbonetrade-feed (Socket.IO service)nats-broker (NATS container)
Backend pub/sub protocolSocket.IO semanticsNATS subjects
Browser real-time streamSocket.IO websocket pathnats.ws websocket path via ingress
IngressNGINXNGINX (extended with /nats-ws)
Runtime modelDocker ComposeDocker Compose

NATS Baseline Constraints​

  • Broker image should be lightweight and local-friendly (nats:2.x).
  • Compose service exposes:
    • 4222 (client TCP),
    • 8222 (monitoring, optional local debug),
    • websocket endpoint mapped via ingress path.
  • Subject conventions are defined in system/messaging-subject-map.md.

Closeness Policy​

State 007 is intentionally not source-close to the old trade-feed implementation; it is architecture-close to state 003 except for the messaging layer replacement.

Changes expected:

  • removal of trade-feed runtime component,
  • introduction of NATS client wiring in producer/consumer services,
  • frontend stream client migration.