WebSockets vs. SSE should be about ordering and correctness

SMRTR summary
A simple question about web architecture is hiding a surprisingly tricky problem. When developers debate WebSockets versus Server-Sent Events for real-time web applications, most focus on speed and payload size. But the real issue, argues Elixir creator José Valim, is event ordering.
When two users update the same data simultaneously, and responses arrive over separate streams, the interface can silently freeze on stale information, potentially misleading users indefinitely. That's not "eventually consistent," Valim notes. It's just wrong.
WebSockets, being bidirectional, handle this elegantly by keeping both requests and responses on a single authenticated channel, preserving causal order without extra server hops. SSE with Fetch can be made to work, but often adds latency or client-side complexity to compensate.
The takeaway for developers: before choosing your real-time transport, ask not just how fast data travels, but whether you can guarantee it arrives in the right order.
SMRTR provides this summary for quick context. The original article belongs to Hacker News.
Read the original article