Skip to content

Latest commit

 

History

History
74 lines (49 loc) · 4.82 KB

README.md

File metadata and controls

74 lines (49 loc) · 4.82 KB

FoundationDB Storage Adapter for JanusGraph

Downloads Build Status

JanusGraph is an Apache TinkerPop enabled graph database that supports a variety of storage and indexing backends. This project adds FoundationDB to the supported list of backends. FoundationDB is a distributed, ACID key-value store.

Features

JanusGraph, coupled with the FoundationDB storage adapter provides the following unique features:

  • High availability
  • ACID transactions

Compatibility Matrix

FDB Storage Adapter JanusGraph FoundationDB
0.1.0 0.5.2 6.2.22

Getting started

The FoundationDB storage adapter requires a single FoundationDB instance or cluster and the FoundationDB client libraries. Downloads for server and client can be found here.

Setting up FoundationDB

Mac install instructions can be found here and Linux here.

Installing the adapter from a binary release

Binary releases can be found on GitHub.

This installation procedure will copy the necessary libraries, properties, and Gremlin Server configuration files into your JanusGraph installation.

  1. Download the JanusGraph release that is compatible up with the FoundationDB storage adapter.
  2. Download the desired FoundationDB storage adapter release.
  3. Unzip the storage adapter zip file and run ./install.sh $YOUR_JANUSGRAPH_INSTALL_DIRECTORY

Assuming you have a FoundationDB cluster up and running, you can connect from the Gremlin console by running:

gremlin> graph = JanusGraphFactory.open('conf/janusgraph-foundationdb.properties')

To start Gremlin Server run gremlin-server.sh directly or bin/janusgraph.sh start which will also start a local Elasticsearch instance.

Installing from source

Follow these steps if you'd like to use the latest version built from source.

  1. Clone the repository. git clone http://github.com/JanusGraph/janusgraph-foundationdb
  2. Build the distribution package. mvn package -DskipTests
  3. Follow the binary installation steps starting at step 3.

Configuration Options

Property Description Default
storage.fdb.directory Name of the JanusGraph storage directory in FoundationDB. janusgraph
storage.fdb.version The FoundationDB client version. 5.2.0
storage.fdb.cluster-file-path The location of the fdb.cluster file. /etc/foundationdb/fdb.cluster
storage.fdb.isolation-level The three options are serializable, read_committed_no_write, and read_committed_with_write. serializable
storage.fdb.get-range-mode The two options are list and iterator. list

Isolation Levels

FoundationDB provides serializable isolation under a specific set of constraints. Namely transactions will fail if they take longer than 5 seconds or read/write more than 10,000,000 bytes. This adapter allows the user to relax the how JanusGraph uses FoundationDB transactions and to spread a single JanusGraph transaction over more than one FoundationDB transaction. read_committed_no_write allows reads to be spread across more than one transasction, but will fail any writes that are attempted outside of the first transaction period. read_committed_with_write allows reads and writes to extend over more than one single transaction. If this option is selected, invariants may be broken and the system will behave similarily to an eventually consistent system.

GetRange Modes

FoundationDB provides asynchronous iterator for range query, with the following advantages compared to synchronous iterator: on-demand data stream pulling, better memory efficiency, and better thread parallelism management to support MultiQuery in JanusGraph. When the get-range-mode is chosen with option of iterator, asynchronous iterator is turned on. The default option of get-range-mode is list currently, with which synchronous iterator is chosen.

The get-range-mode and the isolation level can be chosen independently in the storage plugin's configuration options.