Level 1: Foundations · L1.1 APIs: REST, gRPC, GraphQL, WebSockets/SSE, webhooks
Real-time: polling, SSE, WebSockets, webhooks
Choose a push or pull mechanism for a real-time feature.
13 min · Free
What you take away
- Polling is pull on a timer: simple, cacheable, stateless, and wasteful in proportion to how fresh you want to be.
- Server-sent events push one way over plain HTTP and reconnect themselves — enough for most 'live' features.
- WebSockets are the only option when the client must send continuously too, and the price is a stateful connection per user.
- Webhooks are server-to-server push with at-least-once delivery: verify signatures, expect duplicates, ignore order.
How the class is laid out
- The problem
- The simple version
- REST
- Contracts
- Idempotency
- gRPC
- GraphQL
- Real-time
- Check your understanding