読者です 読者をやめる 読者になる 読者になる

Debuginfo

思考とアウトプット

OrientDBにRexsterをインストールする

Rexster is a multi-faceted graph server that exposes any Blueprints graph (e.g. TinkerGraph, Neo4j, OrientDB, DEX, Titan, and Sail RDF Stores) through several mechanisms with a general focus on REST. This HTTP web service provides standard low-level GET, POST, PUT, and DELETE methods, a flexible extensions model which allows plug-in like development for external services..

RexterはGraphDBをRESTfulにするインターフェイスを提供するサーバです。(という私の認識です^^;;)
ちょっとドキュメントがアップデートされていない感がありますが、一応書いてあることをやりましょう。

単体で起動することを確認。

> unzip rexster-server-2.1.0.zip
> cd rexster-server-2.1.0
> ./bin/rexster.sh -s # 起動を確認
# on the other window
> ./bin/rexster.sh -x # Shutdown

次にorient-client.jarとorient-enterprise.jarをrexster-server-2.1.0/libにコピー。

> cp orientdb-graphed-1.1.0/lib/orientdb-client-1.1.0.jar rexster-server-2.1.0/lib
> cp orientdb-graphed-1.1.0/lib/orientdb-enterprise-1.1.0.jar rexster-server-2.1.0/lib

それからrexster.xmlを編集する。

> cd rexster-server-2.1.0
> cp rexster.xml rexster.xml.org # just in case
> vi rexster.xml
      <graph>
            <graph-enabled>true</graph-enabled>
            <graph-name>orientdbsample</graph-name>
            <graph-type>orientgraph</graph-type>
            <graph-location>local:/Users/<USER>/GraphDB/orientdb-graphed-1.1.0/databases/tinkerpop</graph-location>
            <properties>
                <username>admin</username>
                <password>admin</password>
            </properties>
            <extensions>
                <allows>
                    <allow>tp:gremlin</allow>
                </allows>
            </extensions>
        </graph>

orientdbサーバを起動して、rexsterをあげる。

> ./bin/rexster.sh -s
[INFO] WebServer - .:Welcome to Rexster:.
[INFO] WebServer - Using [/Users/<USERID>/GraphDB/rexster-server-2.1.0/rexster.xml] as configuration source.
[INFO] RexsterApplicationGraph - Graph [emptygraph] - configured with allowable namespace [tp:gremlin]
[INFO] GraphConfigurationContainer - Graph emptygraph - mocktinkertransactionalgraph[vertices:0 edges:0] loaded
[INFO] RexsterApplicationGraph - Graph [tinkergraph] - configured with allowable namespace [tp:gremlin]
[INFO] GraphConfigurationContainer - Graph tinkergraph - mocktinkertransactionalgraph[vertices:6 edges:6 directory:data/graph-example-1] loaded
[INFO] RexsterApplicationGraph - Graph [tinkergraph-readonly] - configured with allowable namespace [tp:gremlin]
[INFO] GraphConfigurationContainer - Graph tinkergraph-readonly - readonlyindexablegraph[tinkergraph[vertices:6 edges:6 directory:data/graph-example-1]] loaded
[INFO] RexsterApplicationGraph - Graph [gratefulgraph] - configured with allowable namespace [tp:gremlin]
[INFO] GraphConfigurationContainer - Graph gratefulgraph - tinkergraph[vertices:809 edges:8049 directory:data/graph-example-2] loaded
[INFO] GraphConfigurationContainer - Graph emptysailgraph -  not enabled and not loaded.
[INFO] GraphConfigurationContainer - Graph sailgraph -  not enabled and not loaded.
[INFO] RexsterApplicationGraph - Graph [orientdbsample] - configured with allowable namespace [tp:gremlin]
[INFO] GraphConfigurationContainer - Graph orientdbsample - orientgraph[local:/Users/kamesho/GraphDB/orientdb-graphed-1.1.0/databases/tinkerpop] loaded
[INFO] GraphConfigurationContainer - Graph neo4jsample -  not enabled and not loaded.
[INFO] GraphConfigurationContainer - Graph dexsample -  not enabled and not loaded.
[INFO] GraphConfigurationContainer - Graph remotetinkergraph -  not enabled and not loaded.
[INFO] WebServer - Rexster Server running on: [http://localhost:8182]
[INFO] WebServer - Rexster configured with no security.
[INFO] WebServer - RexPro serving on port: [8184]
[INFO] ShutdownManager$ShutdownSocketListener - Bound shutdown socket to /127.0.0.1:8183. Starting listener thread for shutdown requests.

それからAPIもしくはdoghouseで確認する。詳しい確認は今度で。。
Brwoserでhttp://127.0.0.1:8182/graphs/tinkergraph/verticesをたたいてJSONの確認する。

参考: