Showing video-processing progress with Server-Sent Events
At VdoCipher, I built live video-encoding progress updates with Server-Sent Events and Kinesis during the team’s migration of video processing from AWS to GCP.
A video upload is not the end of the workflow. The person who uploaded it also needs to know whether it is processing, ready, or needs attention. That state needs to reach the interface while the processing work happens elsewhere.
The part I worked on
My work connected encoding progress to the customer-facing application so it could update as processing advanced. SSE was part of delivering those updates to the browser; Kinesis was part of the event flow.
My part of the migration was the live progress flow. The broader cloud migration was a team effort.
Why SSE fits this kind of interface
Progress updates mostly travel in one direction: from the server to the browser. SSE provides an HTTP event stream for that direction. It can be a useful fit without introducing a two-way messaging protocol for a feature that does not need one.
SSE is a delivery mechanism, though, not a complete state model. Reconnecting a stream does not by itself establish that the interface has received every relevant update.
The behavior worth checking
For a progress interface, I would check these cases explicitly:
- A user opens the page after processing has already started.
- The connection drops and later reconnects.
- A job finishes while the browser is disconnected.
- Processing fails rather than reaches completion.
- Several jobs are active at the same time.
- A user navigates away and the connection needs cleaning up.
- An event belongs to a different customer or a record the user cannot access.
A durable source of job state and a live event stream solve different problems. The interface needs a way to establish current state, as well as a way to hear about subsequent changes. Authentication and record-level authorization need to apply to both.
What I want the user to understand
A useful progress view answers a few ordinary questions: did the work start, what is happening now, and what should I do if it fails?
That is the product responsibility behind the event flow. The engineering work is valuable when those answers remain clear, including after a refresh, a reconnect or a failed job.