TidesDB is a fast and efficient key value storage engine library written in C. The underlying data structure is based on a log-structured merge-tree (LSM-tree).
It is not a full-featured database, but rather a library that can be used to build a database atop of.
Features:
- Concurrent multiple threads can read and write to the storage engine. The skiplist uses an RW lock which means multiple readers and one true writer. SSTables are sorted, immutable and can be read concurrently they are protected via page locks. Transactions are also thread-safe.
- Column Families store data in separate key-value stores. Each column family has their own memtable and sstables.
- Atomic Transactions commit or rollback multiple operations atomically. Rollsback all operations if one fails.
- Cursor iterate over key-value pairs forward and backward.
- WAL write-ahead logging for durability. As operations are appended they are also truncated at specific points once persisted to an sstable(s).
- Multithreaded Compaction manual multi-threaded paired and merged compaction of sstables. When run for example 10 sstables compacts into 5 as their paired and merged. Each thread is responsible for one pair - you can set the number of threads to use for compaction.
- Background flush memtable flushes are enqueued and then flushed in the background.
- Chained Bloom Filters reduce disk reads by reading initial pages of sstables to check key existence. Bloomfilters grow with the size of the sstable using chaining and linking.
- Zstandard Compression compression is achieved with Zstandard. SStable entries can be compressed as well as WAL entries.
- TTL time-to-live for key-value pairs.
- Configurable many options are configurable for the engine, and column families.
- Error Handling API functions return an error code and message.
- Easy API simple and easy to use API.