TidesDB v0.6.0b #244
guycipher
announced in
Announcements
Replies: 1 comment 1 reply
-
Keep it up team!. this is a strong step towards v1.0! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are getting further and further everyday. Thank you for those whom contributed to TidesDB and or have joined the TidesDB contribution team! This minor has corrected lots of bugs, stabilized lots of functionality and we added automatic partial background merging. Let's keep it up, we are nearing TidesDB 1!
Features
Building
Using cmake to build the shared library.
cmake -S . -B build cmake --build build cmake --install build
Requirements
You need cmake and a C compiler.
You also require the
snappy
,lz4
, andzstd
libraries.Linux
MacOS
Windows
Windows using vcpkg
Bindings
Bindings are in the works in various languages.
Discord Community
Join the TidesDB Discord Community to ask questions, work on development, and discuss the future of TidesDB.
Dependencies
Include
Usage
Each database method returns a
tidesdb_err_t*
which returns an error code and message. If no error, TidesDB returnsNULL
.Example of error structure
Opening a database
To open a database you pass the path to the database directory and a pointer to the database.
Creating a column family
In order to store data in TidesDB you need a column family. This is by design.
You pass
TDB_MEMTABLE_SKIP_LIST
) passTDB_USING_HT_MAX_LEVEL
if usingTDB_MEMTABLE_HASH_TABLE
TDB_MEMTABLE_SKIP_LIST
) passTDB_USING_HT_PROBABILITY
if usingTDB_MEMTABLE_HASH_TABLE
TDB_NO_COMPRESSION
,TDB_COMPRESS_SNAPPY
,TDB_COMPRESS_LZ4
,TDB_COMPRESS_ZSTD
]TDB_MEMTABLE_SKIP_LIST
,TDB_MEMTABLE_HASH_TABLE
]Using Snappy compression, bloom filters and hash table memtable.
Dropping a column family
Listing column families
Putting a key-value pair
You pass
Putting a key-value pair with TTL
Getting a key-value pair
You pass
Deleting a key-value pair
You pass
Transactions
You can perform a series of operations atomically. This will block other threads from reading or writing to the column family until the transaction is committed or rolled back.
You begin a transaction by calling
tidesdb_txn_begin
.You pass
Now we can add operations to the transaction.
Cursors
You can iterate over key-value pairs in a column family.
Compaction
Manual
You can manually compact sstables. This method pairs and merges column family sstables.
Say you have 100, after compaction you will have 50; Always half the amount you had prior. You can set the number of threads to use for compaction.
Automatic / Background Partial Merge Compaction
You can start a background partial merge compaction. This will incrementally merge sstables in the background from oldest to newest. Merges are done every n seconds. Merges are not done in parallel but incrementally. Less blocking than manual compaction.
You pass
License
Multiple
What's Changed
New Contributors
Full Changelog: v0.5.0b...v0.6.0b
This discussion was created from the release v0.6.0b.
Beta Was this translation helpful? Give feedback.
All reactions