Is possible to use Gephi plugin and JanusGraph at same time?

928 views
Skip to first unread message

Augusto Will

unread,
Oct 28, 2017, 3:53:06 AM10/28/17
to JanusGraph users
I need to connect to a remote tinkerPop server(local)

:remote connect tinkerpop.server conf/remote.yaml

and at same time visualize the data of that database stores, sending subgraph to Gephi plugin (Graph Streaming), like that

:remote connect tinkerpop.gephi
:remote config visualTraversal graph

is possible to have these two connections? With tinkerpop.server and tinkerpop.gephi?




Stephen Mallette

unread,
Oct 28, 2017, 7:09:05 AM10/28/17
to JanusGraph users
The console can manage as many connections as you can create, but only one will be active at a time. See the docs/help on how to switch between them. That said, you can't exactly visualize a remote database, at least not directly, as the Gephi plugin relies on a local copy of the graph to do its work. But, there is a way to get a local copy of the graph from the remote server: Make a subgraph!

The process would look like this:

gremlin> :remote connect tinkerpop.server conf/remote-objects.yaml
==>Configured localhost/127.0.0.1:8182

Note above that you use the remote-objects.yaml so that you get actual "objects" back from the server and not toString() representations meant for viewing in the console. Next build the subgraph you want to visualize:

gremlin> :> g.V(1).outE('knows').subgraph('sg').cap('sg')
==>tinkergraph[vertices:3 edges:2]

The output of that remote traversal submit to the server is stored in a hidden variable called "result" and you can extract the subgraph from that:

gremlin> graph = result[0].getObject()
==>tinkergraph[vertices:3 edges:2]

now that you have a local graph instance you can do your visualization as needed with Gephi.

--
You received this message because you are subscribed to the Google Groups "JanusGraph users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/janusgraph-users/c9f414d6-7b8b-4a94-bc84-561359f29ce6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages