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:
FDB Storage Adapter | JanusGraph | FoundationDB |
---|---|---|
0.1.0 | 0.5.2 | 6.2.22 |
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.
Mac install instructions can be found here and Linux here.
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.
./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.
Follow these steps if you'd like to use the latest version built from source.
git clone http://github.com/JanusGraph/janusgraph-foundationdb
mvn package -DskipTests
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 |
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 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.