Twitch 上门系统设计难题

Given

  • There is already defined Twitch video stream and chat box with a viewer count
  • There is a User Service that requires User_id and provides User’s Age and Gender.

The interviewer is a PM and wants to check if this feature is possible.
Question
Need to add Analytics dashboard of all viewers based on Gender, Agde distribuution graphs below the video stream.

Approach

  • I had a WebSocket approach where the user devices provide heartbeat checks to server and Server produces data analytics on active users.