21 releases (9 stable)

2.1.0 Feb 13, 2021
1.3.0 Dec 19, 2020
1.2.0 Nov 26, 2020
1.1.0 Jul 13, 2020
0.12.1 Mar 1, 2018

#3 in Database implementations

Download history 3/week @ 2020-11-09 2/week @ 2020-11-16 30/week @ 2020-11-23 9/week @ 2020-11-30 18/week @ 2020-12-07 12/week @ 2020-12-14 5/week @ 2020-12-21 4/week @ 2020-12-28 21/week @ 2021-01-04 1/week @ 2021-01-11 48/week @ 2021-01-18 4/week @ 2021-01-25 5/week @ 2021-02-01 54/week @ 2021-02-08 131/week @ 2021-02-15 3/week @ 2021-02-22

66 downloads per month

MPL-2.0 license

255KB
5.5K SLoC

IndraDB CI

A graph database written in rust.

IndraDB consists of a server and an underlying library. Most users would use the server, which is available via releases as pre-compiled binaries. But if you're a rust developer that wants to embed a graph database directly in your application, you can use the library.

IndraDB's original design is heavily inspired by TAO, facebook's graph datastore. In particular, IndraDB emphasizes simplicity of implementation and query semantics, and is similarly designed with the assumption that it may be representing a graph large enough that full graph processing is not possible. IndraDB departs from TAO (and most graph databases) in its support for properties.

For more details, see the homepage.

Features

  • Support for directed and typed graphs.
  • Support for queries with multiple hops.
  • Cross-language support via Cap'n Proto, or direct embedding as a library.
  • Support for JSON-based properties tied to vertices and edges.
  • Pluggable underlying datastores, with built-in support for in-memory-only, rocksdb and sled. Postgresql is available separately.
  • Written in rust! High performance, no GC pauses, and a higher degree of safety.

Getting started

This should start an in-memory-only datastore, where all work will be wiped out when the server is shutdown. You can persist your work with one of the alternative datastores.

In-memory

By default, IndraDB starts an in-memory datastore that does not persist to disk. This is useful for kicking the tires. If you want to use the in-memory datastore, simply start up an instance. e.g.:

indradb [options]

RocksDB

If you want to use the rocksdb-backed datastore, use the rocksdb subcommand. Supply the rocksdb database url via the command line. e.g.:

indradb rocksdb [/path/to/rocksdb.rdb] [options]

Sled

If you want to a datastore based on sled, use the sled subcommand; e.g.:

indradb sled [path/to/sled] [options]

If the sled directory does not exist, it will be created.

NOTE: The sled datastore is not production-ready yet. sled itself is pre-1.0, and makes no guarantees about on-disk format stability. Upgrading IndraDB may require you to manually migrate the sled datastore. Additionally, there is a standing issue that prevents the sled datastore from having the same level of safety as the RocksDB datastore.

Install from source

If you don't want to use the pre-built releases, you can build/install from source:

  • Install rust. IndraDB should work with any of the rust variants (stable, nightly, beta.)
  • Make sure you have gcc 5+ installed.
  • Clone the repo: git clone git@github.com:indradb/indradb.git.
  • Build/install it: cargo install.

Running tests

Use make test to run the test suite. Note that this will run the full test suite across the entire workspace, including tests for all datastore implementations. Similarly, you can run make bench to run the full benchmarking suite.

You can filter which tests run via the TEST_NAME environment variable. e.g. TEST_NAME=create_vertex make test will run tests with create_vertex in the name across all datastore implementations.

Dependencies

~39MB
~797K SLoC