3 ms·
Omg you just got me thinking! I am already planning on using Redis for this board. What I could do is keep 1 main copy of my leaderboard, that is used mainly f
by o____o 7y ago
Omg you just got me thinking! I am already planning on using Redis for this board.
What I could do is keep 1 main copy of my leaderboard, that is used mainly for writes, then I also keep other copies of the leaderboard but in snapshots of previous 30 seconds, 1 minute, 1:30 etc.
This way depending on when you first queried for the initial page, you access copy of the leaderboard at X time.
One edge case I'm not sure about is what I should do if user has a pointer to a very old copy of the leaderboard, lets say >30 minutes or >1 hour, it would be kind of expensive to keep so many copies (or maybe not?).