input-output-hk / iodb   0.4.0

Creative Commons Zero v1.0 Universal GitHub

Multiversioned key-value database, especially useful for blockchain

Scala versions: 2.12

IODB - database engine for blockchain

Build Status

IODB is embedded storage engine designed for blockchain applications. It is inspired by RocksDB. It provides ordered key-value store, it is similar to SortedMap<byte[], byte[]>. Its main advantage are snapshots with branching and fast rollbacks.

Main features include:

  • Ordered key-value store
  • Written in Scala, functional interface
  • Multi-threaded background compaction
  • Very fast durable commits
  • Atomic updates with MVCC isolation and crash protection
  • Snapshots with branching and rollbacks
  • Log structured storage, old data are never overwritten for improved crash protection

Getting started

IODB builds are available in Maven repository. Maven dependency snippet is bellow, replace $VERSION with Maven Central :

<dependency>
    <groupId>org.scorexfoundation</groupId>
    <artifactId>iodb_2.12</artifactId>
    <version>$VERSION</version>
</dependency>

Code examples are in the src/test/scala/examples folder.

Documentation is in the doc folder.

Compile

IODB works with Intellij IDEA with Scala plugin.

  • Checkout IODB:
git clone https://github.com/input-output-hk/iodb.git
  • Install SBT

  • Compile IODB and install JAR files into local repository:

sbt publish