Realtime Transport Strategy
Choose between Long Poll, SSE, and WebSocket using product interaction needs.
Pattern level: macro
Choose between Long Poll, SSE, and WebSocket using product interaction needs.
Pattern level: macro
Default to SSE for server-push only and WebSocket for full duplex collaboration.
Symptom: Requests intermittently fail.
Mitigation: Retry with backoff and restore from last known good snapshot.
| Category | Level | Requirement | Done When |
|---|---|---|---|
| functional | unit | Incoming events respect sequence and dedupe semantics. | Out-of-order, duplicate, and missing event tests are all covered. |
| functional | integration | Reconnect path correctly hydrates snapshot and applies deltas. | Reconnect test proves no duplicate rows or missing updates. |
| a11y | integration | Live updates are announced without overwhelming screen readers. | Announcement batching and wording pass manual SR checks. |
| a11y | e2e | Focus remains stable when real-time updates occur. | Keyboard-only user can continue primary task uninterrupted. |