Issue: Current benchmarking for data structures like hash, list, and sorted set is very poor, compared to string (as string DS, we have an on-par performance with Redis).
Current Approach
For example, for the list data structure, when adding a new element to a list key, we have to do the below things:
- Client sends
lpush foo bar
- Server gets byte array value from
foo key from the DB
- Server encodes that byte array value to
LinkedList java heap data structure
- Server adds new element
bar to that LinkedList
- Server decodes that
LinkedList object to byte array
- Server saves that new byte array into
foo key in the DB
As you can see, decoding/encoding data structure from off-heap to on-heap is very costly, this leads to poor performance when the list is extensive, cost more heap space, and increase latency.
Issue: Current benchmarking for data structures like hash, list, and sorted set is very poor, compared to string (as string DS, we have an on-par performance with Redis).
Current Approach
For example, for the list data structure, when adding a new element to a
listkey, we have to do the below things:lpush foo barfookey from the DBLinkedListjava heap data structurebarto thatLinkedListLinkedListobject to byte arrayfookey in the DBAs you can see, decoding/encoding data structure from off-heap to on-heap is very costly, this leads to poor performance when the list is extensive, cost more heap space, and increase latency.