Realtime Transport Strategy

Choose between Long Poll, SSE, and WebSocket using product interaction needs.

Pattern level: macro

TL;DR

Default to SSE for server-push only and WebSocket for full duplex collaboration.

Protocol Chooser

  1. WebSocket: Bi-directional real-time interactions and chat/presence.
  2. SSE: Server -> client push streams such as feed updates.
  3. Long Poll: Simple refresh models and low-frequency updates.

Failure modes

Failure Mode Walkthrough

Symptom: Requests intermittently fail.

Mitigation: Retry with backoff and restore from last known good snapshot.

Testing + Accessibility Rubric

CategoryLevelRequirementDone When
functionalunitIncoming events respect sequence and dedupe semantics.Out-of-order, duplicate, and missing event tests are all covered.
functionalintegrationReconnect path correctly hydrates snapshot and applies deltas.Reconnect test proves no duplicate rows or missing updates.
a11yintegrationLive updates are announced without overwhelming screen readers.Announcement batching and wording pass manual SR checks.
a11ye2eFocus remains stable when real-time updates occur.Keyboard-only user can continue primary task uninterrupted.

Used In Case Studies

Related Patterns