SwayDB v0.4 release with compression and cacheFunctions


#1

Hey all, just released SwayDB’s v0.4. It includes compression implementation (internal & external) for both persistent and in-memory databases and also includes cacheFunctions.

Internal compression is explained briefly in the file format section here. It’s basically aimed at removing duplicate data. For example - time-series or measurement data can contain a lot of duplicate values.

External compression can be configured to use both LZ4 and Snappy using groupingStrategy. Or both compression libraries can be combined. So a single file can contain both LZ4 & Snappy compressed key-values depending on whichever library results in the best compression.

cacheFunctions - Instead of performing read-modify-write we can use cacheFunctions and submit type-safe functions to the database. This drastically reduces read, write and space requirements. It also allows the use external libraries in the database to modify data instead of requiring a custom query language. I will try to create an example using origami folds.

Please give it a spin let me know what you think.

Cheers,
Simer