Skip to content

Getting Started

spmallette edited this page Apr 18, 2011 · 57 revisions

The Rexster distribution comes with a Grateful Dead dataset. The raw data is located here. This section will describe the basics of loading up the Rexster web server and accessing some basic services.

Starting the Rexster Web Server

There is a shell script called rexster.sh. When that script is evaluated at the command line, it starts up the Rexster web server. Please be aware that the rexster.xml file is provided with Rexster (see rexster.xml). It is possible to make use of different properties through a different XML file by calling:

rexster.sh -configuration other.xml
[INFO] WebServer - .:Welcome to Rexster:.
[INFO] GraphConfigurationContainer - Graph emptygraph - tinkergraph[vertices:0 edges:0] loaded
[INFO] RexsterApplicationGraph - Graph [tinkergraph] - configured with allowable namespace [tp:gremlin]
[INFO] GraphConfigurationContainer - Graph tinkergraph - tinkergraph[vertices:6 edges:6] loaded
[INFO] RexsterApplicationGraph - Graph [tinkergraph-readonly] - configured with allowable namespace [tp:gremlin]
[INFO] GraphConfigurationContainer - Graph tinkergraph-readonly - (readonly)tinkergraph[vertices:6 edges:6] loaded
[INFO] RexsterApplicationGraph - Graph [gratefulgraph] - configured with allowable namespace [tp:gremlin]
[INFO] GraphConfigurationContainer - Graph gratefulgraph - tinkergraph[vertices:809 edges:8049] loaded
[INFO] GraphConfigurationContainer - Graph sailgraph - sailgraph[memorystore] loaded
[INFO] GraphConfigurationContainer - Graph orientdbsample -  not enabled and not loaded.
[INFO] GraphConfigurationContainer - Graph neo4jsample -  not enabled and not loaded.
[INFO] GraphConfigurationContainer - Graph dexsample -  not enabled and not loaded.
[INFO] MapResultObjectCache - Cache constructed with a maximum size of 1000
[INFO] WebServer - Web Server configured with com..sun..jersey..config..property..packages: com.tinkerpop.rexster
[INFO] WebServer - No servlet initialization parameters passed for configuration: admin-server-configuration
[INFO] WebServer - Rexster Server running on: [http://localhost:8182]
[INFO] WebServer - Dog House Server running on: [http://localhost:8183]
[INFO] WebServer - Hit <enter> to shutdown Rexster

GETing the Basics

When the web server is loaded, it is possible to see the number of currently loaded graphs by dereferencing the base-URI:

http://localhost:8182

The result of GETing this base-URI should look as follows:

{
    "version":"0.2-SNAPSHOT",
    "name":"Rexster: A RESTful Graph Shell",
    "graphs":["tinkergraph","gratefulgraph","sailgraph","emptygraph"],
    "query_time":1.82123,
    "up_time":"0[d]:00[h]:00[m]:07[s]"
}

To look at the properties of an individual graph and what Extensions it has associated with it, then append the names of one of the values from the “graphs” array above to the base-URI as in:

http://localhost:8182/tinkergraph

and the result will look like:

{
  "version":"0.3-SNAPSHOT",
  "name":"gratefulgraph",
  "graph":"tinkergraph[vertices:809 edges:8049]",
  "read_only":false,
  "type":"com.tinkerpop.blueprints.pgm.impls.tg.TinkerGraph",
  "query_time":0.623691,
  "up_time":"0[d]:00[h]:00[m]:24[s]",
  "extensions":[{"title":"evaluate an ad-hoc Gremlin script for a graph.","href":"tp\/gremlin"}]}

Reading more about the Basic REST API for Rexster will help in learning more about how general access to the graph will work.

The Dog House

The Dog House provides for browser-based access to some of the underlying Rexster services (basic vertex/edge browsing and Gremlin console) and by default is available at:

http://localhost:8183

Stopping the Rexster Web Server

To shutdown the web server, simply hit <enter>. This will properly shutdown the graph and exit.

[INFO] WebServer - Shutting down Rexster
[INFO] RexsterApplication - Shutting down tinkergraph - tinkergraph[vertices:6 edges:6]
[INFO] RexsterApplication - Shutting down gratefulgraph - tinkergraph[vertices:809 edges:8049]
[INFO] RexsterApplication - Shutting down tinkergraph-readonly - (readonly)tinkergraph[vertices:6 edges:6]
[INFO] RexsterApplication - Shutting down sailgraph - sailgraph[memorystore]
[INFO] RexsterApplication - Shutting down emptygraph - tinkergraph[vertices:0 edges:0]
Clone this wiki locally