An Akka Persistence Plugin for Titan graph

A replicated Akka Persistence journal backed by Titan.

Prerequisites

Release

Technology Version
Plugin
Scala 2.11.7
Akka 2.4.0 or higher
Titan 1.0.0

Snapshot

Technology Version
Plugin
Scala 2.11.7
Akka 2.4.0 or higher
Titan 1.0.0

Installation

SBT

Release

resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/releases"

libraryDependencies ++= Seq(
  "com.github.acflorea" %% "akka-persistence-titan"  % "1.0.0" % "compile")

Snapshot

resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"

libraryDependencies ++= Seq(
  "com.github.acflorea" %% "akka-persistence-titan"  % "1.0.1-SNAPSHOT" % "compile")

Maven

Release

// Scala 2.11.7
<dependency>
    <groupId>com.github.acflorea</groupId>
    <artifactId>akka-persistence-titan_2.11</artifactId>
    <version>0.7.6</version>
</dependency>

Snapshot

// Scala 2.11.7
<dependency>
    <groupId>com.github.acflorea</groupId>
    <artifactId>akka-persistence-titan_2.11</artifactId>
    <version>1.0.0-SNAPSHOT</version>
</dependency>

Build Locally

You can build and install the plugin to your local Ivy cache. This requires sbt 0.13.8 or above.

sbt publishLocal


It can then be included as dependency:

libraryDependencies += "com.github.acflorea" %% "akka-persistence-titan" % "1.0.1-SNAPSHOT"

Configuration Example


# Give enough time for embedded Cassandra to warm up
akka.test.single-expect-default = "30s"

akka.persistence.journal.plugin = "titan-journal"
titan-journal {

  # FQCN of the titan journal plugin
  class = "akka.persistence.titan.journal.TitanJournal"

  # Give enough time for embedded Cassandra to warm up
  circuit-breaker.call-timeout = "30s"
  circuit-breaker.reset-timeout = "30s"

  graph {
    # Titan
    # ~~~~~
    storage.backend = "embeddedcassandra"
    storage.conf-file = "cassandra/cassandra.yaml"
    storage.cassandra.keyspace = "akkajournal"

    # ElasticSearch
    # ~~~~~
    index.search.backend = "elasticsearch"
    index.search.elasticsearch.client-only = false
    index.search.elasticsearch.local-mode = true
    index.search.directory = "../db/es"

  }

}

akka.persistence.snapshot-store.plugin = "titan-snapshot-store"
titan-snapshot-store {

  # FQCN of the cassandra journal plugin
  class = "akka.persistence.titan.snapshot.TitanSnapshotStore"

  # Give enough time for embedded Cassandra to warm up
  circuit-breaker.call-timeout = "30s"
  circuit-breaker.reset-timeout = "30s"

  graph {
    # Titan
    # ~~~~~
    storage.backend = "embeddedcassandra"
    storage.conf-file = "cassandra/cassandra.yaml"
    storage.cassandra.keyspace = "akkasnapshot"

    # ElasticSearch
    # ~~~~~
    index.search.backend = "elasticsearch"
    index.search.elasticsearch.client-only = false
    index.search.elasticsearch.local-mode = true
    index.search.directory = "../db/es"

  }
}

Status

Change Log

1.0.0

  • First release version to Maven Central Releases.

1.1.0

Persistent data is now humar readable. Add details for persistent objects (the details are the JSON representation of persisted journal/snapshot entries)

Each persisted vertex is now connected to its human readable representation through an edge labeled "has_details", the details vertex being labeled "payload_details". The storage of details is performed asynchronous in a separate actor.

Author / Maintainer