Reputation: 889
I am very beginner to graph database and Titandb. I am trying to create a small graph and saving into cassandra.
a) I added vertices and edges with TinkerGraph and tried to save. Later I got to know It is not possible to save TinkerGraph. Then what is the use of it?
b) I tried
g = TitanFactory.open('conf/titan-cassandra-es.properties')
mgmt = g.getManagementSystem()
Got following error
No signature of method: com.thinkaurelius.titan.graphdb.database.StandardTitanGraph.getManagementSystem() is applicable for argument types: () values: []
What does g.getManagementSystem()
mean?
c) Which programming I need to learn for Gremlin (groovy or java)?
I have downloaded titan-1.0.0-hadoop1.zip
, rexster-server-2.6.0.zip
.
I am not understanding head and tail of it. Please someone help me to create simple graph in titan
and save into cassandra
and visualise from rexster
Upvotes: 1
Views: 609
Reputation: 46206
You can't mix Rexster with Titan 1.x. Titan 0.5.x is compatible with Rexster. Titan 1.x is compatible with Rexster's replacement Gremlin Server. You should not need to download Gremlin Server separately. It is distributed with Titan 1.0.0. You can just start it with:
bin/titan.sh start
You can read the appropriate instructions here.
a) I added vertices and edges with TinkerGraph and tried to save. Later I got to know It is not possible to save TinkerGraph. Then what is the use of it?
TinkerGraph is an in-memory database. It has many uses. You can use it for learning (which is where you are now), analyzing sub-graphs from larger graphs, production systems where graphs tend to be static and fit in memory, etc. You can read more about that in this tutorial on Gremlin Console.
b) What does g.getManagementSystem() mean?
You use the Management System API to create the schema for Titan (i.e. tell it which properties, define edge/vertex labels, etc.) By defining a schema you give Titan hints on how to be more efficient.
c) Which programming I need to learn for Gremlin (groovy or java)?
As of TinkerPop 3.x, Gremlin is just pure Java. You only use groovy for syntactic sugar in most cases.
If you are trying to learn to program and learn graphs and learn TinkerPop all at the same time I highly recommend that you not work with Titan first. Start with TinkerGraph and the Gremlin Console to learn the basics. This "Getting Started" tutorial should be helpful. When you've become more comfortable with TinkerGraph, then consider looking at Titan. What's wonderful about TinkerPop is that switching to try other graphs is easy. If you know how to use Gremlin with TinkerGraph, then you should be good to use it with Titan, Neo4j, or any other graph database you'd like to use.
Upvotes: 4
Reputation: 334
a) TinkerGraph is a reference implementation for vendors implementing the TinkerPop APIs, as well as a sandbox for playing around. It's not intended to be used in production.
b) What version of Titan are you using? The getManagementSystem
API doesn't exist in Titan 1.0.0. The management subsystem exists to provide access to APIs for various Titan-specific subsystems (indexing, schema, etc).
c) Most Gremlin examples you'll find are written in Groovy, so you'll probably have an easier time with that.
Upvotes: 1