All versions of this manual
X
 

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 with ws:// or wss://)
  • graphAlias (required): Name of the remote graph instance, alias graph
  • traversalSourceAlias (optional, default g): Name of the corresponding traversal source instance, alias g
  • 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 server
  • user (optional): JanusGraph user
  • password (optional): JanusGraph password
  • alternativeNodeId (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, default false): Whether to allow self-signed certificates

There are 3 alternatives to configure JanusGraph:

  • Using aliases: define the graphAlias and traversalSourceAlias 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.

JanusGraph 0.3.x

Linkurious DOES NOT support JanusGraph versions above 0.3.0 with the default configuration.

However, you can connect to a JanusGraph 0.3.x instance by switching the GraphSON serializer from version 3 to version 2.

To do this, follow these steps:

  1. Open the gremlin server configuration file, generally located at $INSTALL_DIR/conf/gremlin-server/gremlin-server.yaml
  2. Remove or comment the following line { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV3d0, config: { ioRegistries: [org.janusgraph.graphdb.tinkerpop.JanusGraphIoRegistry] }}
  3. 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 with ws:// or wss://)
  • user (optional): JanusGraph user
  • password (optional): JanusGraph password
  • graphName (required): Name of the graph to use
  • create (optional): true to let Linkurious create the repository if it does not exist
  • alternativeNodeId (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, default false): Whether to allow self-signed certificates