Can Aerospike's Large Ordered List match the Sorted Sets of Redis for Leaderboards?

1k Views Asked by At

I'm considering replacing Redis with Aerospike and I wanted to know if aerospike is capable of delivering the same capabilities and performance as Redis's sorted sets for Leaderboards within an application. I need to be able to quickly insert, read and update items in the set. I also need to be able to do range queries on them and retrieve the rank of an arbitary item in the set quickly.

1

There are 1 best solutions below

4
On

Aerospike does not currently have a built-in Leaderboard feature. However, this is one of many functions that anyone can build with User Defined Functions (UDFs) and Large Data Types (LDTs).

The way this would work is you would have a set of UDFs that employs two Large Ordered List LDTs. One LLIST would manage the primary collection, and the other LLIST would provide the Leaderboard/Scoreboard ordering (basically used as an index into the primary collection).

The UDFs would manage the user interaction (read/write/delete primary value and read/scan leaderboard value) and pass the work on to the LDT functions.

We've talked internally about building these examples to show the power of UDFs and LDTs. Perhaps, with a little incentive, we could raise the priority of getting these examples done.

The other issue is performance. What are your latency and throughput requirements?