vendredi 20 août 2021

Building a all time top-k score leaderboard

Suppose we are building a module for game which keeps track of the all time top scores. Whenever players complete a game, a service will publish the player's score.

Whenever we call our service, it should return the top 5 scores (along with names) of the players.

How can I approach this?

I was just thinking of implement Top K algo using min heap.
But drawbacks are
1. Single host - not scalable
2. No support for streaming data, we should have the data ready
3. Not processing parallelly

Aucun commentaire:

Enregistrer un commentaire