Small prototype to look at group and ranking across a lot of users.
- 10^6 players (can easily bump)
- 20,000 groups
- users are randomly put into 0..5 groups using a good distribution random # generator
- all users are playing a single game
- assuming the setup is a point in time somewhere during the game
- each user will get a score set randomly between 0..99
- the rank of a particular player across all players
- the ranking of a player across all associated groups
- aggregate ranking across all associated groups that a player is associated with.
- group:#{group}:members - [set] holds all the ids of the players in the group. #{group} in [0..20,000]
- user:#{user}:groups - [set] holds all the users associated groups. #{user} in [0..10^6]
- group:#{group}:game:1:rankings - [sorted set] holds all the player members current score for the game.
- game:1:rankings - [sorted set] holds all the 10^6 players scores
- user:#{user}:groups:rankings - [sorted set] built on the fly. union of all groups the user is associated with. scores are aggregated.