-
Notifications
You must be signed in to change notification settings - Fork 0
Rexster Graph Server
Rexster exposes any Titan graph database via a JSON-based REST interface. In this way, the raw graph’s vertices and edges can be referenced using REST endpoints. Moreover, provided and custom algorithms (called Kibbles) can be stored on the server, triggered via HTTP, and their results returned via JSON. Finally, Rexster provides an administration and visualization interface that can be accessed from most major web browsers.
The following is a list of the benefits of using Rexster.
-
JSON-based REST interface ensures language agnostic connectivity to Titan.
- See Bulbs for a Python connector.
- HTML/JavaScript graphical user interface for graph administration and visualization.
- Extend with more RESTful endpoints by adding kibbles to Rexster.
- See Rexster-Kibbles provided by TinkerPop.
- Remote Gremlin traversals via the Gremlin extensions and the Rexster console.
- Security support via user authentification.
Before using Rexster with Titan, it must for be downloaded. Rexster can be downloaded at this location. Below is a snippet of shell commands that demonstrate the process for getting Rexster downloaded and started using a default configuration.
$ curl -L https://github.com/downloads/tinkerpop/rexster/rexster-server-x.y.z.zip > rexster-server-x.y.z.zip
% Total % Received % Xferd Average Speed Time Time Time Current ...
...
$ unzip rexster-server-x.y.z.zip
Archive: rexster-server-x.y.z.zip
creating: rexster-server-x.y.z/
...
$ cd rexster-server-x.y.z
$ ./rexster-server.sh --startUse CTRL-C to kill the server. Now that Rexster is downloaded and working, it is necessary to configure Rexster to work with Titan (see Rexster’s Getting Started page).
This section explains how to configure Rexster to use a Titan graph database. An example rexster.xml file is provided below (see Rexster Configuration).
<?xml version="1.0" encoding="UTF-8"?>
<rexster>
<rexster-server-port>8182</rexster-server-port>
<rexster-server-host>0.0.0.0</rexster-server-host>
<rexster-shutdown-port>8183</rexster-shutdown-port>
<rexster-shutdown-host>127.0.0.1</rexster-shutdown-host>
<rexpro-server-port>8184</rexpro-server-port>
<rexpro-session-max-idle>1790000</rexpro-session-max-idle>
<rexpro-session-check-interval>3000000</rexpro-session-check-interval>
<base-uri>http://localhost</base-uri>
<web-root>public</web-root>
<character-set>UTF-8</character-set>
<security>
<authentication>
<type>default</type>
<configuration>
<users>
<user>
<username>rexster</username>
<password>rexster</password>
</user>
</users>
</configuration>
</authentication>
</security>
<graphs>
<graph>
<graph-name>titanexample</graph-name>
<graph-type>com.thinkaurelius.titan.tinkerpop.rexster.TitanGraphConfiguration</graph-type>
<graph-location>tmp/titan</graph-location>
<graph-read-only>false</graph-read-only>
<properties>
<storage.backend>local</storage.backend>
<buffer-size>100</buffer-size>
</properties>
<extensions>
<allows>
<allow>tp:gremlin</allow>
</allows>
</extensions>
</graph>
</graphs>
</rexster>
There are three ways to configure Rexster for use with Titan:
- If building Titan and Rexster from source, copy the
target/titan-x.y-jar-with-dependencies.jarto the Rexster./rexster-server/src/main/extdirectory and then domvn clean installon Rexster. - If building Titan from source and using Rexster distribution, copy the
target/titan-x.y-jar-with-dependencies.jarto the Rexster./rexster-server/target/rexster-server-${VERSION}/extdirectory. - If using the Titan zipped distribution download, copy all jar files in the
libdirectory to the Rexster./rexster-server/target/rexster-server-${VERSION}/extdirectory.
NOTE: Future releases (beyond the 0.1) will have a much more efficient/easier packaging model.
Once that is done, specify the graph type as shown above. Rexster’s graph-location option is equivalent to Titan’s storage.directory. In the event that Titan is being configured for “local” mode, please make sure that this value is an existing directory. All other Titan specific configurations are subsumed under properties. In the example above, the backend and the buffer size are configured. Any of the Titan configurations can be used here. For more information on configuring Rexster, please see the Rexster configuration documentation.
Rexster has a rich API for working with Blueprints Graph implementations, but there are some limitations to consider when using Rexster with Titan. These limitations are driven by the limitations in the Titan Blueprints implementation.
- The POST of an edge cannot be done with an identifier. In other words, do this:
http://localhost/graphs/titan/edgesand not thishttp://localhost/graphs/titan/edges/1234. - Titan uses vertex indexes and does not support manual indexes. Hence, all operations on the
indicesresource are not supported. Use key indexes instead.


