ADR-004Date: 2026-04-18
STATUS: ACCEPTEDBidirectional WebSockets vs Server-Sent Events for Real-Time Telemetry
Author: Real-Time Communications Team
#WebSockets#SSE#Real-Time#Low-Latency
1. Context & Problem Statement
TradingMaster.app and AI-Reception.ist require high-frequency bi-directional data flow: TradingMaster requires sub-millisecond client heartbeat pings and order execution acknowledgments; AI-Reception.ist requires full-duplex streaming audio frames.
2. Decision
We standardized on Bidirectional WebSockets over TLS 1.3 for all live telemetry and audio streaming, rather than unidirectional Server-Sent Events (SSE). We implemented binary ArrayBuffer protocols with compression for market feeds and Opus streaming for voice.
3. Consequences & Trade-Offs
Positive Outcomes
True full-duplex communication with negligible per-message framing overhead (2–10 bytes)
Support for binary audio packets (Opus) and binary market order books without Base64 encoding tax
Negative / Trade-Offs
Requires custom client-side reconnection logic and exponential backoff retry handling
Mitigation Strategies
Built an enterprise-grade resilient WebSocket client wrapper with automatic heartbeat and offline queuing
Standards & References
Need ADR Governance in Your Engineering Org?
We help engineering teams establish versioned ADR repositories, C4 models, and automated CI test gates.
Learn More About Architecture Sprints