Design a real time dashboard showing the most played songs?

Take an example of a music streaming service like Spotify, Soundcloud, etc. The requirement is to show the 20 most played songs around the world to its users.

Functional Requirements:

  • The top 20-50 songs played in the last week, for example.
  • The data will be real time (not older than 30 mins) from the current timestamp, i.e, you would probably have to implement a sliding window algorithm instead of a fixed window.
  • You need to show the song title, album art, and artist.
  • You should also design how the system will capture the play event to calculate the most played songs.
  • The songs list will be sorted by most played to least played.
  • The list can comprise of all genres.
  • Fire the play event once a song is played for at least 10% of it's duration.

Non-functional Requirements:

  • The service should be available most of the time, i.e, minimum downtime.
Comments (8)