Comment sentiment goes stale fast. A job that runs overnight tells you how an audience felt yesterday, which is no use if you wanted to catch a reaction turning while the video was still climbing. So this one streams.

The path a comment takes

A Cloud Function pulls comments and drops them onto Pub/Sub, which absorbs the bursts that arrive whenever a large channel posts. Dataflow reads from there, classifies each comment, and writes the result out. End to end it stays under a minute.

Comments arrive in many languages, often several within one thread, so the classification step never assumes English. A Streamlit dashboard sits on top, showing per-video breakdowns and trends across a set of videos. It replaced about 40% of the time I used to spend scrolling comment sections by hand, which was the whole reason for building it.

What actually took the time

Not the sentiment model. That was close to a solved problem before I started.

The work was in everything around it. How much Pub/Sub should buffer before backpressure becomes a problem. How many times a malformed comment gets retried before it is set aside. What the dashboard shows when a stage is degraded and the numbers are incomplete. A pipeline that works on a clean afternoon is easy; one that keeps working through a bad message and a transient outage is the part worth building.