SwayDB v0.2 released - A Key-value storage library

Hey All,

Released SwayDB version 0.2. I have not posted here before so I will start with an intro :slight_smile:

SwayDB is a fast key-value storage library for single/multiple disks & in-memory. Performance reaches up to 300,000+ read & writes per second for Persistent databases & up to 600,000+ reads & writes per second for Memory databases.

Overall goal with SwayDB is to be high performant, storage efficient, non-blocking, easy to use type-safe API similar to working with Scala collection and to support both persistent (single & multiple disks) & in-memory storage types.

I’ve just released version 0.2 with support for Range APIs (remove & update) - Range APIs are incredibly fast and have very low RAM & storage requirements. Gigabytes of data/millions of records can be updated & removed in less than millisecond response time using the Range APIs.

This release also includes changes for backward compatibility to support any future SwayDB’s files format updates.

Please try it out and let me know of your thoughts. The API documentation can be found on the website.

Here are a two examples on how SQL like tables can be created in SwayDB and also an example on EventSourcing.

Here is the GitHub repo - https://github.com/simerplaha/SwayDB
Documentation website (Scala.js) - http://www.swaydb.io/
Examples - https://github.com/simerplaha/SwayDB.examples
Benchmark repo - https://github.com/simerplaha/SwayDB.benchmark
Benchmark results - http://www.swaydb.io/performance/macbook-pro-mid-2014
Website code written in Scala.js - https://github.com/simerplaha/SwayDB.io

Release notes for v0.2 - https://github.com/simerplaha/SwayDB/releases/tag/v0.2

1 Like

Hey All,

Just released version 0.2.1. This release includes compaction performance improvements.

A quick speed benchmark resulted in 17% overall performance improvement, pushing writes to over 350,000/second. I will update new benchmarks results on the performance page with the release of v0.3 which will include ‘Time to live’ APIs with nanosecond precision. This API will allow for automatic deletion of key-values from the database by supplying the remove time.

TTL APIs preview

//put & expire
db.put(key = 1, value = "some value", removeAfter = 10.seconds)

//expire a range of key-values
db.remove(from = 1, to = 100, after = 1.day)

TTL APIs will also allow for batch writes (ACID like transaction), similar to batch documentation here.

Batch API preview

db.batch(
  Batch.Put(key = 100, value = "one hundred"),
  Batch.Remove(key = 1, to = 100, after = 10.minutes)
)

Any suggestions to further improve the APIs & ideas for new APIs will be very helpful.

Thank you
Simer