I've been playing with Titan graph server for a while now. And my feeling is that, despite an extensive documentation, there is a lack of Getting started from scratch tutorial.
My final goal is to have a titan running on cassandra and query with StartTheShift/thunderdome.
I have seen few ways of starting Titan:
Using Rexster
from this link, I was able to run a titan server with the following steps:
- download rexster-server 2.3
- download titan 0.3.0
- copy all files from
titan-all-0.3.0/libs
torexster-server-2.3.0/ext/titan
edit
rexster-server-2.3.0/rexster.xml
and add (between a ):<graph> <graph-name>geograph</graph-name> <graph-type>com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration</graph-type> <graph-read-only>false</graph-read-only> <graph-location>/Users/vallette/projects/DATA/gdb</graph-location> <properties> <storage.backend>local</storage.backend> <storage.directory>/Users/vallette/projects/DATA/gdb</storage.directory> <buffer-size>100</buffer-size> </properties> <extensions> <allows> <allow>tp:gremlin</allow> </allows> </extensions> </graph>
for a berkeleydb or:
<graph>
<graph-name>geograph</graph-name>
<graph-type>com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration</graph-type>
<graph-location></graph-location>
<graph-read-only>false</graph-read-only>
<properties>
<storage.backend>cassandra</storage.backend>
<storage.hostname>77.77.77.77</storage.hostname>
</properties>
<extensions>
<allows>
<allow>tp:gremlin</allow>
</allows>
</extensions>
</graph>
for a cassandra db.
- launch the server with
./bin/rexster.sh -s -c rexster.xml
- dowload rexster console and run it with
bin/rexster-console.sh
- you can now connect to your graph with
g = rexster.getGraph("geograph")
The problem with this method is that you are connected via rexster and not gremlin so you do not have autocompletion. The advantage is that you can name your database (here geograph).
Using Titan server with cassandra
- start the server with
./bin/titan.sh config/titan-server-rexster.xml config/titan-server-cassandra.properties
create a file called
cassandra.local
withstorage.backend=cassandrathrift storage.hostname=127.0.0.1
start titan gremlin and connect with
g = TitanFactory.open("cassandra-es.local")
this works fine.
Using titan server with BerkeleyDB
From this link:
- download titan 0.3.0
- start the server with
./bin/titan.sh config/titan-server-rexster.xml config/titan-server-berkeleydb.properties
- launch titan gremlin:
./bin/gremlin.sh
but once I try to connect to the database (graph) in gremlin with
g = TitanFactory.open('graph')
it creates a new database called graph in the directory I'm in. If i execute this where my directory (filled) is I get:Could not instantiate implementation: com.thinkaurelius.titan.diskstorage.berkeleyje.BerkeleyJEStoreManager
Could someone clarify these process, and tell me what I'm doing wrong. Thanks