SwayDB is a type-safe & non-blocking key-value storage library for single/multiple disks and in-memory storage.
It's an implementation of Log-structured merge-tree written in Scala with asynchronous Leveled Compaction based on push-pull strategy built on the Actor model.
It supports configurable Graph like file format for faster reads and has compression support for both memory & persistent databases.
SwayDB alternatives and similar packages
Based on the "Database" category.
Alternatively, view SwayDB alternatives based on common mentions on social networks and blogs.
Do you think we are missing an alternative of SwayDB or a related project?
Embeddable persistent and in-memory key-value storage engine for high performance & resource efficiency.
We aim to be efficient at managing bytes on-disk and in-memory by recognising reoccurring patterns in serialised bytes without restricting the core implementation to any specific data model (SQL, NoSQL etc) or storage type (Disk or RAM). The core provides many configurations that can be manually tuned for custom use-cases, but we aim to eventually implement automatic runtime tuning when we are able to collect and analyse runtime machine statistics & read-write patterns.
Manage data by creating familiar typed data structures like
SetMap that can easily be converted
to native Java and Scala collections.
Perform conditional updates/data modifications with any Java, Scala, Kotlin or any native JVM code - No query language.
Scalable on a single machine - Data can be stored on multiple local HDD/SSD and, single or multiple Threads can be allocated for reads, caching & compaction.
SwayDB's core is non-blocking, but the APIs are configurable to be blocking, non-blocking and/or reactive.
Configurable to suit different workloads. Some use-cases are:
- General key-value storage
- Message queues
- Time-series or Events data
- Application logs
- Archiving data or cold storage with high file level compression
- Simple data types -
- Single or multiple disks persistent, in-memory or periodically persistent.
- Atomic updates and inserts with transactions.
- Custom updates using any JVM function.
- TTL - auto expiring key-values.
- Range update, remove & expire.
- Non-blocking with customisable non-blocking or blocking APIs.
- Key only iterations (Lazily fetched values).
- Configurable compression with LZ4 & Snappy
- Configurable core internals.
- Duplicate values can be eliminated with compressDuplicateValues.
- A small type-safe Actor implementation.
- IO type for type-safe error handling.
Your feedback and review is very important to get to production. Please get involved via chat, issues or email which is on my profile.
See tasks labelled Production release that are required before becoming production ready.
Related GitHub projects
- SwayDB.java.examples - Java examples demonstrating features and APIs.
- SwayDB.kotlin.examples - Kotlin examples demonstrating features and APIs.
- SwayDB.scala.examples - Scala examples demonstrating features and APIs.
- SwayDB.benchmark - Performance benchmarks.
- SwayDB.website - Website code.
Contributions are welcomed following the Scala code of conduct.
We would like to see others find SwayDB useful in their own projects, companies and other open-source projects for both personal and commercial reasons, the license only asks for your modifications (e.g bug-fixes) to SwayDB's source code to be shared so that it supports the contributors by not duplicating efforts and shares knowledge on this project's subject.
Thank you Jetbrains for providing an open-source licence for their awesome development tools.
*Note that all licence references and agreements mentioned in the SwayDB README section above are relevant to that project's source code only.