Week 10 : Stateful Stream Processing & Interactive Queries (Days 46–50)
StreamSocial Stateful Processing Platform
Build Scope
Event enrichment — join live user actions with profile materialized views.
Recommendation matching — table-table joins on preferences and content metadata.
Trending query surface — windowed RocksDB state exposed through REST.
Engagement scoring — changelog-backed state with decay and recovery.
Content scoring topology — custom processor chain with weighted ranking.
Operations console at : http://localhost:5100 — live metrics and recovery controls.
Platform Position
StreamSocial already ingests events and runs stateless transforms elsewhere in the estate. This repository is the stateful compute plane: where raw activity becomes enriched events, matchable recommendations, queryable trends, and durable engagement scores. LinkedIn’s feed mixer, X’s trending rail, and Spotify’s ranker all compile to the same primitives implemented here.
Component Architecture
Core Concepts
Stream-table join avoids the database round-trip
A like event carries user_id and target_id only. A co-partitioned materialized view keyed by user_id holds demographics. The join runs in-process—the same pattern Instagram applies before feed ranking.
Table-table join reacts to either table changing
A preference update or a new content publish both recompute match scores. At moderate catalog sizes a scan-on-update model is acceptable; at scale you shard by category or co-partition.


