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:
from this link, I was able to run a titan server with the following steps:
titan-all-0.3.0/libs
to rexster-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.
./bin/rexster.sh -s -c rexster.xml
bin/rexster-console.sh
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).
./bin/titan.sh config/titan-server-rexster.xml config/titan-server-cassandra.properties
create a file called cassandra.local
with
storage.backend=cassandrathrift storage.hostname=127.0.0.1
start titan gremlin and connect with g = TitanFactory.open("cassandra-es.local")
this works fine.
From this link:
./bin/titan.sh config/titan-server-rexster.xml config/titan-server-berkeleydb.properties
./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
Titan is a scalable graph database optimized for storing and querying graphs containing hundreds of billions of vertices and edges distributed across a multi-machine cluster. Titan is a transactional database that can support thousands of concurrent users executing complex graph traversals in real time.
According to the documentation TitanFactory.open()
takes either the name of a config file or the name of a directory to open or create a database in.
If what steven says is true, there would be two ways to connect to the database with a BerkelyDB backend:
Start the database through bin/titan.sh
. Connect to the database through the rexster console.
DON'T start the database using bin/titan.sh
. Use the gremlin console instead: TitanFactory.open("database-location")
. This will open the database. But this does not have a rexster server. Nothing else will be able to access the database but the gremlin console.
With Titan Server/BerkeleyDB, you should attempt to connect via RexPro or REST (Thunderdome should connect over REST). You can't open another Titan-based connection to BerkeleyDB as Titan Server already owns that.
This is different than Titan Server/Cassandra where connectivity occurs over RexPro or REST, but also through embedded Cassandra which enables connectivity over thrift via TitanFactory.open('graph')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With