Overview
How does an open page learn that someone else changed its data? A buyer may be typing a bid when a newer price arrives. The page should show that price while keeping the proposed bid and keyboard focus. An uploaded image presents another question: what lets it remain available after the form is gone, and who may read it?
We will follow these interactions from the browser to the server and back: compare polling and server-sent events (SSE), choose when a two-way channel is useful, and trace an image from uploaded bytes to stored metadata and display.
The required exercises have independent starting files and supplied runtimes.
Part structure
- From Polling to Server-Sent Events: compare delivery, repair an opening race, and connect a feed to a bounded HTTP response.
- Publishing Committed Changes: publish public observations after commitment and check their ordering.
- Recovering Live Views: recover confirmed state and preserve a buyer’s proposal as prices change.
- WebSockets & Bidirectional Communication: choose a transport for the interaction.
- Receiving Image Uploads: validate bounded bytes and use a generated storage key.
- Authorized Image Storage & Display: connect bytes to permissions, metadata and upload feedback.
- Testing Live Updates & Image Storage: compare what controlled checks and real dependencies establish.
- Recap and Feedback: reflect on the part and give feedback.
Live Updates: Optional Background contains local setup for the clock exchange, a WebSocket echo observation, and further testing and storage discussion.