An embeddable, persistent key-value store optimised for sequential reads.
An embeddable, persistent key-value store optimised for sequential reads.
Current Status: Used in production by CleverTap.
We ran a small benchmark for 100 million 4 byte keys with 28 byte values, and the results are shown below:
Note: We’ve only compared this with RocksDB since in all our previous benchmarks,
we’ve observed that RocksDB was the fastest.
More details about this benchmark may be found here.
The primary motivation behind StormDB was to achieve fast sequential scans across all keys
in the database. When we benchmarked sequential reads of popular key value stores, we realised:
time cat 4GB_file >> /dev/null
to understand the raw throughput possible
<repositories>
<repository>
<id>bintray-clevertap-Maven</id>
<name>bintray</name>
<url>https://dl.bintray.com/clevertap/Maven</url>
</repository>
</repositories>
<!-- Heads up! Use the latest version from https://github.com/CleverTap/stormdb/releases/latest -->
<dependency>
<groupId>com.clevertap</groupId>
<artifactId>stormdb</artifactId>
<version>1.0.0</version>
</dependency>
.withDbDir("path/to/db")
.withValueSize(28)
.build();
// Put.
db.put(1, new byte[28]);
// Get.
final byte[] value = db.randomGet(1);
// Iterate over all keys.
db.iterate((key, data, dataOffset) -> {
// Read 28 bytes starting at dataOffset in data[].
});
// Close.
db.close();
```
If the answers to all the points above are a hard “yes”, then you’d benefit from StormDB.
We welcome anybody and everybody to contribute to the code, design, or report bugs.
If there’s a feature which you’d like to see implemented, open an issue about it. If you’d
like to implement the feature yourself, please discuss the design before beginning
its implementation.
A few pointers
StormDB is maintained by the CleverTap Labs team, with contributions
from the entire engineering team.
StormDB is licensed under the MIT License. Please see LICENSE under the root directory.