1

I want to port a social networking application from sql to JanusGraph. I'll be building the backend using Java because it has amazing documentation in janusgraph's official website. I have some beginner questions.

    JanusGraph graph = JanusGraphFactory.open("my_setup.properties");
  • Is .properties file, the only identifier to access a graph? or is it the file path? (In sql we have a name for database. Is there anything like a graph name?)
  • If I have the copy of properties file with same preferences and rename it to my_setup_2.properties, will it access the same graph or it'll create a new graph?
  • Is there any way I can identify these vertices belongs to this graph from my storage backend or search backend?
  • For what kind of queries storage backend is used and for what kind of queries search backend is used?
  • Is there anyway to dump my database? (for porting the graph from one server to another just like sql dump)
  • I have only found hosting service providers for Janusgraph 0.1.1 (which is outdated. Latest one is 0.2.1 which supports latest elasticsearch) If I go to production with janusgraph 0.1.1 version how bad will it affect me if I use elasticsearch for search backend?
Val
  • 207,596
  • 13
  • 358
  • 360
cegprakash
  • 2,937
  • 33
  • 60

1 Answers1

2

Is .properties file, the only identifier to access a graph? or is it the file path? (In sql we have a name for database. Is there anything like a graph name?)

JanusGraph has a pluggable storage and index backend. The .properties file just tells JanusGraph which backend to use and how they are configured. Different graphs instances will just point to different storage folders, indexes, etc. By looking at the documentation for the config file, it seems though you can specify a graphname which can be used with the ConfiguredGraphFactory to open a graph in this fashion ConfiguredGraphFactory.open("graphName")

If I have the copy of properties file with same preferences and rename it to my_setup_2.properties, will it access the same graph or it'll create a new graph?

Yes it will access the same data and hence the same graph.

Is there any way I can identify these vertices belongs to this graph from my storage backend or search backend?

I don't know exactly for every storage backend but in the case of Elasticsearch, indexes created by JanusGraph are prefixed with janusgraph. I think there are similar mechanisms for other backends.

For what kind of queries storage backend is used and for what kind of queries search backend is used?

The index backend is used whenever you add an has step on a property indexed with a mixed index. I think all other queries, including an has step on a property configured with a composite index will use the storage backend. For OLAP workloads you can even plug Spark or Giraph on your storage backend to do the heavy lifting.

Is there anyway to dump my database? (for porting the graph from one server to another just like sql dump)

Graphs can be exported and imported to graph file formats like GraphML. It allows you to interface with other graph tools like Gephi for example. You won't be able to sql dump from your SQL database and directly import that to JanusGraph though. If you consider loading a lot of nodes and edges at once, please go through the documentation about bulk loading.

I have only found hosting service providers for Janusgraph 0.1.1 (which is outdated. Latest one is 0.2.1 which supports latest elasticsearch) If I go to production with janusgraph 0.1.1 version how bad will it affect me if I use elasticsearch for search backend?

I don't know about any hosting providers for JanusGraph 2.x. You will easily find hosted services for the pluggable storage backends compatible with JanusGraph 2.x.

Benoit Guigal
  • 838
  • 1
  • 10
  • 24
  • ConfiguredGraphFactory.open("graphName") this always throws me exception https://stackoverflow.com/questions/51557469/illegalstateexception-gremlin-server-must-be-configured-to-use-the-janusgraphm – cegprakash Jul 30 '18 at 08:47