Loading lesson…
Level 1 · Apprentice0 XP
Send news to the user the moment it happens.
Step 1 / 5
ProblemA chat app asks the server every 5 seconds 'anything new?'. Messages feel slow, and 99% of the requests return nothing while costing servers and batteries.
← → step
Before this: Pub/sub and event streams
🛠️ Your turn
Reading is not the skill, doing is. Try for ten minutes before you open the hint. Getting stuck first is what makes the solution stick.
1.Build a live counter with server-sent events: an endpoint streams the current value every time it changes. Then reconnect a client with Last-Event-ID and resume.