Re: JanusGraph and Cassandra modes.


Robert Dale <rob...@...>
 


I know it's a little confusing but the page you point to is from the perspective of Cassandra. The architecture page has a some info on embedded vs. remote JanusGraph - http://docs.janusgraph.org/latest/arch-overview.html

Basically, where you open JanusGraph is where graph processing takes place. Between there and the backend storage is where lots of IO (e.g. network) will take place.

Gremlin Server is a good option when 
-- as you mentioned, having non-JVM-based languages access the graph
-- if you want to separate resources of client processing, graph processing, and backend storage/indexing
-- if you want to separate your dependencies from implementation - e.g. depending on tinkerpop, not janusgraph  would allow you to swap out graph implementations without changing client code
-- if you want to separate concerns of maintenance of components
-- security architecture only allows client access over port 80/443 and not directly to backend databases
-- security policies (authz/authn) are different for accessing graph API vs. backend storage 

Robert Dale


On Wednesday, August 16, 2017 at 5:41:38 AM UTC-4, Manoj Waikar wrote:
Hi,

The Cassandra related JanusGraph documentation specifies various ways in which JanusGraph can be used in concert with Cassandra.

So, if I run Cassandra (on my machine using cassandra -f) and then from my Java / Scala code, if I do the following -
JanusGraph g = JanusGraphFactory.build().set("storage.backend", "cassandra").set("storage.hostname", "127.0.0.1").open();

Then -
  1. I am using the Local Server Mode.
  2. Whereas if Cassandra is running on another machine, and then if I replace 127.0.0.1 (localhost) with the IP of the server where Cassandra is running, then I am using the Remote Server Mode.
  3. Also, when Jason replied to my previous question 3, when he said "your application is creating an embedded graph instance" he didn't mean the JanusGraph Embedded Mode (because clearly, I am not running JanusGraph so no question of it running in the same JVM instance as Cassandra)?
Is my understanding correct?

So, when is the Remote Server Mode with Gremlin Server useful? Is it useful when non-Java based applications would like to communicate with Gremlin server?

Also, if I have to host a web application (written in Java / Scala, on my own server) which stores data in Cassandra, then which mode is best? Is it the local / remote server mode depending on where Cassandra resides with respect to the web server?

Thanks in advance for the replies / help.

Join {janusgraph-users@lists.lfaidata.foundation to automatically receive all group messages.