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.
Titan includes a light-weight version of Rexster as the Titan Server which is easier to setup and provides better performance than the full Rexster server. However, Titan Server only supports Gremlin queries and does not provide a REST interface.
The following is a list of the benefits of using Rexster.
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 -O -L http://tinkerpop.com/downloads/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 --start
You can validate that it is working by opening a browser and navigating to http://localhost:8182 which should present a Rexster landing page with links to the root of the REST API and to the Dog House.
Use CTRL-C to kill the server. Now that Rexster is downloaded and verified to be working, it is necessary to configure Rexster to work with Titan.
This section explains how to configure Rexster to use a Titan graph database (see also Rexster’s Getting Started page).
PREREQUISITE: These instructions assume that a graph has been created in Titan as described in the “Loading Data Into Titan” section of the Getting Started page.
Edit the REXSTER_HOME/rexster.xml and include the Titan configuration portion in the graphs section (see Rexster Configuration).
<?xml version="1.0" encoding="UTF-8"?>
<rexster>
...
<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>
<storage.buffer-size>100</storage.buffer-size>
</properties>
<extensions>
<allows>
<allow>tp:gremlin</allow>
</allows>
</extensions>
</graph>
</graphs>
</rexster>

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.
Rexster needs to have Titan and its related library dependencies made available to it. Rexster has an ext directory where extensions and other related libraries can be put on Rexster’s path for deployment. All files in the root of that directory and sub-directories will be added to Rexster’s classpath.
To add Titan to Rexster, first make a directory as in:
mkdir REXSTER_HOME/ext/titan
Then, if building Titan from source:
cp TITAN_HOME/target/titan-x.y.z-standalone/lib/*.* REXSTER_HOME/ext/titan
or, if using the Titan zipped distribution download:
cp TITAN_HOME/lib/*.* REXSTER_HOME/ext/titan
NOTE: Future releases (beyond the 0.2) will have a much more efficient/easier packaging model.
Start Rexster with:
rexster$ bin/rexster.sh -s -c rexster.xml
Access the Titan graph at the following URI:
http://localhost:8182/graphs/titanexample
Rexster has a rich API for working with Blueprints Graph implementations, but there are some limitations to consider when using Rexster with Titan:
http://localhost/graphs/titan/edges and not to this http://localhost/graphs/titan/edges/1234.indices resource are not supported. Use key indexes instead.