The Eventful API: Rethinking Frontend State from the Server Down
summary
Proposes that mutate endpoints return explicit events describing every state change so the frontend applies targeted mutations instead of re-fetching objects; demos a todo app and an Eventful API pattern implemented with an Express middleware that accumulates emits and attaches an events list to JSON responses. Shows alternatives: WebSockets, Server-Sent Events, and a hybrid stream, notes testing becomes simpler, and warns about race conditions solved by DB timestamps or a code‑check roundtrip to ensure correct ordering.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 1:17The state synchronization issue
- 4:34Architectural principles
- 8:27Orchestration vs choreography
- 9:55Transitioning to eventful APIs
- 11:53Implementing event-driven flows
- 14:32Event delivery mechanisms
- 17:38Managing race conditions
related talks
49mEvent-Sourcing your React-Redux applications
13mUsing events and modern sm tools to clean up local-first logic
43mPatterns for Building Event-driven Web & Mobile App Backends
31mEvent Driven Frontends: What, Why and How
21mEvent is the new Model
58mFrontin' like a Back-er
47mPatterns for Building Event-driven Web & Mobile App Backends
40mReactive Programming: A Better Way To Write Frontend Applications
