I'm not totally sure I understand the problem. My guess is that you
want to say how a given user ranked over time.
For instance today it is the Top-1023 but yesterday it was just the Top-4982.
Assuming I got it, to make this memory efficient, if you have a given
sampling rate (like 1 sample per day), you could do the following:
1) Just take a single leaderboard, a single zset key.
2) Iterate over all the elements of the leaderboard with a script
every 24 hours, and populate a per-user list where you PUSH the
timestamp+current_rank.
3) Make sure to split the list by different key by, like, 3 months, so
that you have few elements per list to make sure the list will be
encoded as a ziplist.
This way you can go back in time and say how a given user ranked, but
all your computations are performed in a single sorted set when a new
rank is submitted.
Cheers,
Salvatore
--
Salvatore 'antirez' Sanfilippo
open source developer - GoPivotal
http://invece.org
To "attack a straw man" is to create the illusion of having refuted a
proposition by replacing it with a superficially similar yet
unequivalent proposition (the "straw man"), and to refute it
— Wikipedia (Straw man page)