Configuring data-sources: JanusGraph
JanusGraph is supported since version 0.1.1.
Configuration
To edit the JanusGraph data-source configuration,
you can either use the Web user-interface
or edit the configuration file located at linkurious/data/config/production.json
.
Example configuration:
"dataSources": "graphdb": "vendor": "janusGraph" "url": "ws://127.0.0.1:8182/" "graphAlias": 'graph1' "traversalSourceAlias": "g1" "index": "vendor": "janusGraphSearch" "create": true
Supported graphdb
options for JanusGraph:
url
(required): URL of the Gremlin server (must be a WebSocket URL, i.e. start withws://
orwss://
)graphAlias
(required): Name of the remote graph instance, aliasgraph
traversalSourceAlias
(optional, defaultg
): Name of the corresponding traversal source instance, aliasg
configuration
(alternative configuration): Dictionary of configuration values (for reference, see the JanusGraph documentation)configurationPath
(alternative configuration): Path to the Gremlin configuration file on the Gremlin serveruser
(optional): JanusGraph userpassword
(optional): JanusGraph passwordalternativeNodeId
(optional): Name of the node property to use as reference in visualizations (see alternative IDs)alternativeEdgeId
(optional): Name of the edge property to use as reference in visualizationslatitudeProperty
(optional): Name of the node property to use for latitude (used in geo mode)longitudeProperty
(optional): Name of the node property to use for longitude (used in geo mode)allowSelfSigned
(optional, defaultfalse
): Whether to allow self-signed certificates
There are 3 alternatives to configure JanusGraph:
- Using aliases: define the
graphAlias
andtraversalSourceAlias
fields - Using a configuration object: define the
configuration
field in json format - Using a configuration path: define the
configurationPath
field
Note that only one of these alternatives can be used.
Dynamic Graphs
You can access your dynamically created graphs using the graph and traversal bindings references.
Simply set graphAlias
to <graph.graphname>
and traversalSourceAlias
to <graph.graphname>_traversal
.
Visit the JanusGraph Documentation for more information on how to set up dynamic graphs.
Serializers Configuration
Linkurious DOES NOT support JanusGraph versions above 0.3.0 with the default configuration.
However, you can connect to a JanusGraph 0.3+ instance by modifying the default serializer configuration.
To do this, follow these steps:
- Locate the gremlin server configuration file:
- Generally located at
$INSTALL_DIR/conf/gremlin-server/gremlin-server.yaml
for JanusGraph versions 0.4 and below. - Generally located at
$INSTALL_DIR/conf/gremlin-server/gremlin-server-cql-es.yaml
for JanusGraph versions 0.5 and above.
- Generally located at
- Replace the entire serializers section with the following:
serializers: - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistryV1d0] }} - { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistryV1d0] }}
- Restart JanusGraph.
Search with JanusGraph
In order to have full-text search, you can choose among the following options:
JanusGraph For Compose
Linkurious can connect to your JanuGraph instances deployed on Compose.
Configuration
Example configuration:
"dataSources": "graphdb": "vendor": "janusGraphForCompose" "url": "wss://xyz.composedb.com:16916" "user": "admin" "password": "XYZ" "graphName": "myGraph" "index": "vendor": "elasticSearch" "host": "127.0.0.1" "port": 9201
Supported graphdb
options for JanusGraph For Compose:
url
(required): URL of the Gremlin server provided by Compose (must be a WebSocket URL, i.e. start withws://
orwss://
)user
(optional): JanusGraph userpassword
(optional): JanusGraph passwordgraphName
(required): Name of the graph to usecreate
(optional):true
to let Linkurious create the repository if it does not existalternativeNodeId
(optional): Name of the node property to use as reference in visualizations (see alternative IDs)alternativeEdgeId
(optional): Name of the edge property to use as reference in visualizations
latitudeProperty
(optional): Name of the node property to use for latitude (used in geo mode)longitudeProperty
(optional): Name of the node property to use for longitude (used in geo mode)allowSelfSigned
(optional, defaultfalse
): Whether to allow self-signed certificates