keva-dev / keva-dev/keva

Change the approach for data structures: list/hash/sortedSet etc

Open
#136 3 comments 0 reactions 1 assignee Claimed by @tuhuynh27 View on GitHub
enhancement
Dominant language
Java
Stars
109
Forks
11
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.