MT-CTF / capturetheflag

Capture the Flag game using the Minetest Voxel Engine
https://ctf.rubenwardy.com
83 stars 90 forks source link

Rankings Efficiency Discussion #1261

Open farooqkz opened 10 months ago

farooqkz commented 10 months ago

The current structure storage of rankings using Redis is not efficient at all. IMO, we must be using either something like SQL or Redis sorted sets. Then we easily can get top N, and ranking of each user. I also suggest storing online/play time in the DB.

I am going to do it on the experimental server and then expose a RESTful rankings API. I've opened this issue to better track of the progress and receive comments and feedbacks.

LoneWolfHT commented 10 months ago

If it doesn't have anything to do with rankings it shouldn't be in the rankings db.

Then we easily can get top N, and ranking of each user.

Are you suggesting sorted sets because they're easier, more efficient, or both? I've never heard of them until now, so I'll need to go and figure out what they are before I can approve switching to them.

farooqkz commented 4 months ago

For other's information, approval of switching to them has been given in Discord.

LoneWolfHT commented 3 days ago

Going to hijack this issue's topic a little so it applies to all ranking-related speed issues