As of September 2019, Compose will soon no longer support JanusGraph on the platform. Provisioning of new JanusGraph deployments is disabled.
JanusGraph supports connections using HTTP requests or over WebSockets. All connections are performed over HTTPS and require authentication. HTTP-based requests support basic and token authentication, where token authentication is the recommended strategy for optimal performance.
To get the details of what URL to connect to and what credentials to use, see Getting the connection string below.
The actual communication between client and database involves the client sending requests in Gremlin, a dialect of the Groovy language customized for querying graph structures and the database responding to those queries. Find out more about Gremlin in Creating and accessing graphs.
All Compose databases have a "connection string" which shows how to connect to the database. This information, along with other connection credentials, can be found on the Overview page in the Compose Console.
JanusGraph connection information
At the top are the admin user credentials with the password obscured. Clicking show will reveal the password and also insert it into all the following connection strings on the page. There are four sections of connection information.
There are as many HTTP Connection strings as there are HAProxy portals; the default is 2, so there are two HTTPS Connection strings in this panel. The connection strings in this case are simple URIs. This is the fundamental connection string for a JanusGraph deployment. If we take one of the connection strings it looks like this:
If you are using HTTP Requests to connect to the server, this single endpoint can be used to communicate with JanusGraph and is set up to round-robin across all available nodes in the deployment. It includes the host name (
portal93-4.ianuspater.compose-3.composedb.com) and port (
These connection strings will require basic authentication be used with the admin user credentials to connect to the server.
HTTP requests and basic authentication
It is recommended that for anything other than a one-off call on the JanusGraph deployment, you use WebSockets or Token Authentication. Basic authentication is an expensive process which makes your requests slower than necessary.
More information on HTTP requests with JanusGraph is available.
The URIs in this panel can be used to establish a long running session with the JanusGraph deployment. They are prefixed
wss: to denote that the connections will be HTTPS secured. These connection strings require that basic authentication be used with the admin user credentials to connect to the server.
By requesting a token from the server using HTTP requests and basic authentication, a client can use that token to efficiently make multiple requests on the server. This panel contains example
curl commands to obtain that token and how to use it. Find out more about this on the HTTP requests page, including session timeouts and easier ways to process the response.
There is a utility called the Gremlin Console which makes it easy to interact with remote Gremlin. To configure Gremlin Console requires a YAML file with the appropriate details in it. That is what is contained in this panel. For details on how to get, install, configure and use Gremlin Console, see Websockets and Gremlin.
No user/password creation is currently available. Please use the admin user and password shown in the Compose console Overview.
If this article didn't solve things, summon a human and get some help!
Updated 6 months ago