Part 1
4 chapters
Foundations
Why push beats polling, how to choose among WebSockets, SSE, long-polling, and webhooks, how the protocol itself works, and the shared domain every later chapter builds on.
Chapter 1
The Real-Time Problem
Why request/response falls short for a client watching something change, and what polling costs in requests, capacity and staleness.
Chapter 2
Choosing the Right Tool
WebSockets, Server-Sent Events, long-polling, webhooks and gRPC streaming compared on seven dimensions, with an ordered decision rule.
Chapter 3
How WebSockets Work
The HTTP upgrade handshake, frame layout, masking, close codes, subprotocols and extensions under RFC 6455.
Chapter 4
The Shared Domain
The shipping domain for a live handling-event feed: which nouns travel on the wire, the event vocabulary and the seam with the REST booking service.