Janusgraph - Confused about Remote vs Local Gremlin Server and Graph Factories

203 views
Skip to first unread message

Marcio DeBarros

unread,
Aug 14, 2018, 5:47:59 PM8/14/18
to JanusGraph users
This is probably a very trivial question, but I have been "playing" with janusgraph for a few weeks now trying to do a POC. While I have an understanding about the different backend, search indexing, and caching options I realized I am still a bit confused when it comes to the Gremlin Server. I have read in a few articles that I can run it remotely and send commands from the console to be executed on it remotely. 

At this time, I am downloading the janusgraph zip package on my local machine, extracting it, configuring it and running using the gremlin-server-configuration along with the bundled cassandra and elastic search. My main goal is to access this graph database from an Python application running also in my laptop, and be able to load/insert and query data from it.  


Having said that, my questions are:

  1. - In this particular case, do I need to run the gremlin server remotely ? 
  2. - What is the scenario that would require a remote Gremlin Server ? I am assuming that this would be if I have the Gremlin console running standalone in my machine and have janusgraph, backend and search index running remotely somewhere else? 
  3. - Would it matter if I configure the server to use ConfiguredGraphFactory or JanusGraphFactory? What are the appropriate or recommended scenarios for each? 

Thanks in advance for any help on clarifying these questions. 

--MD. 

Jason Plurad

unread,
Aug 14, 2018, 6:31:42 PM8/14/18
to JanusGraph users
1. - In this particular case, do I need to run the gremlin server remotely ?

Yes because the Gremlin Server is what enables you to connect to the graph using Python. The graph instance is running on the Gremlin Server and that entire stack is Java.

2. - What is the scenario that would require a remote Gremlin Server ? I am assuming that this would be if I have the Gremlin console running standalone in my machine and have janusgraph, backend and search index running remotely somewhere else?

You would use a Gremlin Server to support connecting to the graph instance from a non-JVM client (Python, .NET, JavaScript) or to have multiple applications/clients connecting to the same running graph instance.

3. - Would it matter if I configure the server to use ConfiguredGraphFactory or JanusGraphFactory? What are the appropriate or recommended scenarios for each?


You could choose either and still connect to the graph with your Python application. JanusGraphFactory is the older factory, and it allows a static configuration on the Gremlin Server -- that is, you need to have each graph instance defined in the gremlin-server.yaml before starting the server. ConfiguredGraphFactory is the newer factory, and it allows you to dynamically add and remove graph instances from a running server. If you're just getting started, JanusGraphFactory is definitely the easier way to go, especially if you only have one graph instance in your POC.
Reply all
Reply to author
Forward
0 new messages