Communication · Intermediate · 9 min

Real-time Updates

Choose polling, server-sent events or WebSockets and handle reconnect gaps.

STEP 1 / 10
Receive a change after the page loads — isometric concept diagramDefine how an interested client receives later changes. Components: 1. Connection service. Logical component or processing boundary; 2. Bob’s device. Representative clients, not a literal user count. Connections: 1. Bob’s device to Connection service: Receive a change after the page loads; 2. Connection service to Bob’s device: Reply: Connection service. Illustrations are conceptual, not deployed capacity or user counts.Bob’s device → Connection service: Receive a change after the page loads1Connection service → Bob’s device: Reply: Connection service2Connection service: Logical component or processing boundary1Connection serviceLogical component or processingboundaryBob’s device: Representative clients, not a literal user count2Bob’s deviceRepresentative clients, not aliteral user count
1Connection service2Bob’s device
  1. 1Bob’s device → Connection serviceRequestReceive a change after the page loads
  2. 2Connection service → Bob’s deviceReplyReply: Connection service

Conceptual illustration · figures do not imply user counts, deployed capacity or replica counts.

2 components visible · Connection service + Bob’s device highlighted

Orange: request / query · Blue: reply · Purple: event / control · Arrows show direction; speed is illustrative.

You’ll learn

  • A live transport is a delivery mechanism, not a recovery policy.
  • A client needs a meaningful position for resumption.
  • A retained history needs an expiry and fallback contract.

PUT THE IDEA TO WORK

From learning to practice

RELATED PATTERNS

Publish–Subscribe ↗

Further reading

MDN · Server-sent events ↗

MDN · WebSocket API ↗