How nakama in-memory leaderboard implemented?

i like to know how nakama sorts and stores the leaderboard data in memory?

is there a built-in database or it just a code using a sorted dictionary/map to save and manage leaderboard data in Nakama?

Hello @virtouso,

The leaderboards and respective records are stored in the database, however if the leaderboards have the ranksEnabled option set to true then the ranks are computed in memory in what we call the rank cache.

Leaderboard metadata is also cached in memory but also stored in database.

1 Like