Skip to content
Matthias Broecheler edited this page Nov 18, 2013 · 1 revision

Infinispan is a distributed in-memory data-grid that provides fast access to large amounts of data distributed across a cluster of machines. The Infinispan storage backend for Titan is a low latency optimized alternative that excels at read-mostly workloads that uniformly access a graph. In addition, the Infinispan adapter can be configured to provide durable data persistence. For production deployments, Infinispan is operated as a data-grid where data is replicated to multiple machine for safety. Infinispan runs in the same JVM as Titan.

Infinispan is an extremely scalable, highly available key/value data store and data grid platform. It is 100% open source, and written in Java. The purpose of Infinispan is to expose a data structure that is distributed, highly concurrent and designed ground-up to make the most of modern multi-processor and multi-core architectures. It is often used as a distributed cache, but also as a NoSQL key/value store or object database.. — Infinispan Homepage

Infinispan Setup

Since Infinispan runs in the same JVM as Titan, connecting the two only requires a simple configuration and no additional setup. Note, that specifying a local directory is only necessary if local data persistence is desired:

Configuration conf = new BaseConfiguration();
conf.setProperty("storage.directory", "/tmp/graph");
conf.setProperty("storage.backend", "infinispan");
TitanGraph graph = TitanFactory.open(conf);

Infinispan Specific Configuration

In addition to the general Titan Graph Configuration, there are the following Infinispan specific Titan configuration options:

Option Description Value Default Modifiable
storage.transactions Enables transactions and detects conflicting database operations. true or false true yes

Ideal Use Case

The Infinispan storage backend is best suited for read-mostly graph workloads on medium size graphs that can fit entirely into memory on one or multiple machines. Read-mostly means that most of the transactions read data from the graph and very few updates occur. For write-heavy applications, other storage backends will yield much better performance.

Also, for this storage backend to be cost effective, most of the graph should be accessed regularly. If large parts of the graph go stale (e.g. old elements are rarely accessed) it might be more cost effective to use a disk-backed storage backend where stale data can reside on disk where it is rarely accessed.

For uniformly read graphs with few updates, the Infinispan storage backend provides low latency query times that are hard to match by disk-backed storage backends.

Test Menu

Clone this wiki locally