FoundationDB Storage Adapter for JanusGraph
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.
JanusGraph, coupled with the FoundationDB storage adapter provides the following unique features:
- High availability
- ACID transactions
|FDB Storage Adapter||JanusGraph||FoundationDB|
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
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.
- Download the JanusGraph release that is compatible up with the FoundationDB storage adapter.
- Download the desired FoundationDB storage adapter release.
- Unzip the storage adapter zip file and run
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.
- Clone the repository.
git clone http://github.com/JanusGraph/janusgraph-foundationdb
- Build the distribution package.
mvn package -DskipTests
- Follow the binary installation steps starting at step 3.
||Name of the JanusGraph storage directory in FoundationDB.||
||The FoundationDB client version.||
||The location of the
||The three options are
||The two options are
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.
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
list currently, with which synchronous iterator is chosen.
get-range-mode and the isolation level can be chosen independently in the storage plugin's configuration options.