1. Sridhar Ramachandran
  2. bitsy

Wiki

Clone wiki

bitsy / Home

Introduction

Bitsy is a small, fast, embeddable, durable in-memory graph database that implements the Blueprints API.

Features

  • Support for most Blueprints features including key indices and threaded transactions
  • ACID guarantees on transactions
  • Designed for multi-threaded OLTP applications
  • Implements optimistic concurrency control
  • Data stored in readable text files
  • Serialization using the Jackson JSON processor
  • Recovers cleanly from power failures and crashes provided the underlying file system supports metadata journaling, like NTFS, ext3, ext4, XFS and JFS (not FAT32 or ext2)
  • High read and write throughputs in multi-threaded environments
  • Supports online backups through a JMX interface

Getting started

Embedding Bitsy

Maven

If you are using Maven, you can add Bitsy and its dependencies to your project by adding this dependency:

<dependency>
  <groupId>com.lambdazen.bitsy</groupId>
  <artifactId>bitsy</artifactId>
  <version>1.5.2</version>
</dependency>

The Roadmap page has the release notes as well as the objectives for upcoming releases.

Snapshots from Sonatype

You can use 1.5.3-SNAPSHOT (coming soon) for the latest fixes on 1.5.2.

Snapshots are hosted in the Sonatype OSS Maven Repository at https://oss.sonatype.org/content/groups/public/. You can configure this repository by following these instructions. The pom.xml should typically have an additional section that looks like this:

<repositories>
  <repository>
    <id>sonatype-snapshots</id>
    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
  </repository>
</repositories>

Without Maven

Bitsy is a packaged in a JAR file that can be downloaded from the Downloads Page. The latest stable version for production is bitsy-1.5.2.jar. You can add the JAR to your project's classpath along with the dependencies are listed here, which are also available in the Downloads Page.

Using Bitsy

The following code snippet shows how Bitsy can be launched and stopped:

import java.nio.file.Path;
import com.lambdazen.bitsy.BitsyGraph;

public class Test {
    public static void main(String[] args) {
        Path dbPath = Paths.get("...path to a directory...");

        // Open the database
        BitsyGraph myGraph = new BitsyGraph(dbPath);

        ... use myGraph in any number of threads

        // Close the database
        myGraph.shutdown();
    }
}

Now you can use Bitsy like any Blueprints graph database using the Tinkerpop software stack.

Note: The above example uses the simple constructor for BitsyGraph. Refer to Tuning Bitsy for other constructors, including a memory-only (non-durable) database constructor.

Deep dive

This presentation provides an overview of Bitsy's design principles and features. The improvements in version 1.5 are summarized in this presentation. Follow me on Twitter @lambdazen for the latest developments in this project.

The following Wiki pages go into a little more detail:

Licensing

Bitsy is available under the Apache 2.0 License.

Updated