+-----------------+ +-------------------+ +-------------------+
| Event Streams | ---> | Hot Score Job | ---> | Redis SortedSet |
| (likes, watches,| | (Spark/Flink) | | hot:global |
| comments, etc) | +-------------------+ +-------------------+
| |
| v
| +-------------+
| | API Server |
| +-------------+
| |
| +----------------------+ |
+-> | Moderation Service | <---+ |
+----------------------+ | |
v
+---------------+
| Front‑end UI |
+---------------+
The Hot Score Job consumes the event stream, joins with the videos table (metadata + moderation status), applies the decay & weighting, writes the top‑N scores to Redis. The API Server reads from Redis, applies per‑creator caps, and returns JSON to the UI.
GET /api/v1/hot?type=global&limit=20&offset=0
Headers:
Authorization: Bearer <jwt>
X-Feature-Flag: hot_enabled=1
Response (200):
"type": "global",
"generatedAt": "2026-04-12T08:45:00Z",
"items": [
"rank": 1,
"videoId": "v_7a9f2c",
"title": "Epic Sword Battle",
"thumbnailUrl": "https://cdn.imoutotv.com/thumbs/v_7a9f2c.jpg",
"creator":
"id": "c_1234",
"name": "NekoBlade",
"avatarUrl": "https://cdn.imoutotv.com/avatars/c_1234.png"
,
"hotScore": 1284.3,
"stats":
"likes": 540,
"comments": 87,
"watchTimeSec": 25400,
"shares": 30
,
…
],
"paging":
"limit": 20,
"offset": 0,
"total": 1234
Same as above, but type=personal. The server will compute similarity on‑the‑fly using pre‑computed embeddings stored in a vector DB (e.g., Milvus, Pinecone). imoutotv hot