1
votes

I'm looking into how to replicate the Titan 1.0.0 database backed by DynamoDB. Normal cross-region replication for DynamoDB can be done through DynamoDB Streams and Lambda, so I wanted to do the same for the Titan tables that are generated on start up.

Step by step process of what I did:

  1. Started up a Gremlin server on a NA stack
  2. Replicated all the dynamoDB tables that were generated from Titan and its data to a EU region dynamoDB.
  3. Tried starting up a Gremlin server on a EU stack after all the tables/data has been replicated from NA to EU.

This error came up when I tried starting up a new Gremlin server on a EU region:

java.lang.ArrayIndexOutOfBoundsException: Required size [1] exceeds actual remaining size [0]
    at com.thinkaurelius.titan.diskstorage.util.StaticArrayBuffer.require(StaticArrayBuffer.java:80)
    at com.thinkaurelius.titan.diskstorage.util.StaticArrayBuffer.getByte(StaticArrayBuffer.java:156)
    at com.thinkaurelius.titan.diskstorage.util.ReadArrayBuffer.getByte(ReadArrayBuffer.java:67)
    at com.thinkaurelius.titan.graphdb.database.idhandling.VariableLong.readUnsigned(VariableLong.java:34)
    at com.thinkaurelius.titan.graphdb.database.idhandling.VariableLong.readPositive(VariableLong.java:80)
    at com.thinkaurelius.titan.graphdb.database.serialize.StandardSerializer.readClassAndObject(StandardSerializer.java:265)
    at com.thinkaurelius.titan.diskstorage.configuration.backend.KCVSConfiguration.staticBuffer2Object(KCVSConfiguration.java:250)
    at com.thinkaurelius.titan.diskstorage.configuration.backend.KCVSConfiguration.get(KCVSConfiguration.java:102)
    at com.thinkaurelius.titan.diskstorage.configuration.BasicConfiguration.isFrozen(BasicConfiguration.java:93)
    at com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.<init>(GraphDatabaseConfiguration.java:1338)

Keep in that mind that the replication portion is fine. NA & EU DynamoDB are exact replicas of each other.

Questions

  1. Does Titan 1.0.0 store region specific information in its tables?
  2. Has anyone else tried cross-region replication for Titan?

It seems like the only way to perform cross-region replication for Titan is on the service code level rather than from the built-in functionality from dynamoDB Streams + Lambda.

1

1 Answers

0
votes
  1. edgestore stores all vertices, vertex properties and edges and their properties. graphindex is where all composite indexes of vertex and edge properties are stored. These indexes only support equality lookups. systemlog is Titan's system log and logs things like schema changes. txlog is the transaction log which you can optionally make Titan write to before committing work to the edgestore. titan_ids stores the id range leases for each UNIQUE_MACHINE_ID assigned to Titan servers as they start up. Finally, system_properties stores things like the graph schema (property types, multiplicity, indexes, etc).
  2. I have never actually implemented a Titan Cross-Region replication solution, even though I know it is possible.