-
Notifications
You must be signed in to change notification settings - Fork 116
Specific Graph Configurations
This page outlines the graph configurations for specific Blueprints implementations.
The following sections define the common settings for each available graph type supported by TinkerPop.
A DEX graph would be configured as follows:
<graph>
<graph-name>dexsample</graph-name>
<graph-type>dexgraph</graph-type>
<graph-location>/tmp/graph.dex</graph-location>
<properties>
<config-file>dex-config/dex.properties</config-file>
</properties>
<extensions>...</extensions>
</graph>
The <graph-type>
could also be explicitly specified as:
<graph-type>com.tinkerpop.rexster.config.DexGraphConfiguration</graph-type>
The <graph-location>
element contains the path to the DEX file name. The <properties>
section is optional and allows for the <config-file>
element which should contain a pointer to a separate properties file for Dex.
A Neo4j graph would be configured as follows:
<graph>
<graph-name>neo4jsample</graph-name>
<graph-type>neo4jgraph</graph-type>
<graph-location>/tmp/rexster-graph</graph-location>
<extensions>...</extensions>
<properties>
<!-- Memory mapped I/O settings -->
<!-- For high traversal speed it is important to have the nodestore.db and relationshipstore.db files. -->
<neostore.nodestore.db.mapped_memory>285M</neostore.nodestore.db.mapped_memory>
<neostore.relationshipstore.db.mapped_memory>285M</neostore.relationshipstore.db.mapped_memory>
<neostore.propertystore.db.mapped_memory>100M</neostore.propertystore.db.mapped_memory>
<neostore.propertystore.db.strings.mapped_memory>100M</neostore.propertystore.db.strings.mapped_memory>
<neostore.propertystore.db.arrays.mapped_memory>10M</neostore.propertystore.db.arrays.mapped_memory>
<neostore.propertystore.db.index.mapped_memory>10M</neostore.propertystore.db.index.mapped_memory>
<neostore.propertystore.db.index.keys.mapped_memory>10M</neostore.propertystore.db.index.keys.mapped_memory>
...
</properties>
</graph>
The <graph-type>
could also be explicitly specified as:
<graph-type>com.tinkerpop.rexster.config.Neo4jGraphConfiguration</graph-type>
The <properties>
element contains neo4j specific configuration values. Any entries placed here will be converted to name/value pairs to be passed into neo4j for its configuration. Set any properties here as would have been done in a neo4j.properties file.
The configuration for Neo4j HA is quite similar to setting up a standard Neo4j configuration within Rexster. Once a cluster is established, there are just two exceptions to consider when doing the Rexster-side configuration.
First, in the <graph>
element include the <graph-high-availability>
element to tell Rexster to use HA connectivity as follows:
<graph>
<graph-name>neo4jsample</graph-name>
<graph-type>neo4jgraph</graph-type>
<graph-location>/tmp/rexster-graph</graph-location>
<graph-high-availability>true</graph-high-availability>
...
</graph>
If this element is not present, Rexster assumes this value to be false.
Second, include the Neo4j HA settings in the <properties>
section:
<graph>
...
<properties>
<neostore.nodestore.db.mapped_memory>285M</neostore.nodestore.db.mapped_memory>
<neostore.relationshipstore.db.mapped_memory>285M</neostore.relationshipstore.db.mapped_memory>
<neostore.propertystore.db.mapped_memory>100M</neostore.propertystore.db.mapped_memory>
...
<ha.machine_id>1</ha.machine_id>
<ha.server>localhost:6001</ha.server>
<ha.zoo_keeper_servers>localhost:2181,localhost:2182,localhost:2183</ha.zoo_keeper_servers>
</properties>
</graph>
You may need to provide the following dependencies to Rexster in the classpath:
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-ha</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.neo4j</groupId>
<artifactId>neo4j-management</artifactId>
<version>1.3</version>
</dependency>
An OrientDB graph would be configured as follows:
<graph>
<graph-name>orientdbsample</graph-name>
<graph-type>orientgraph</graph-type>
<graph-location>local:C:/data/graph/graph</graph-location>
<extensions>...</extensions>
<properties>
<username>admin</username>
<password>admin</password>
</properties>
</graph>
The <graph-type>
could also be explicitly specified as:
<graph-type>com.tinkerpop.rexster.config.OrientGraphConfiguration</graph-type>
The <graph-location>
element is the URI to the OrientDB database Rexster is expected to connect to. The <properties>
element requires two elements <username>
and <password>
to access the OrientDB graph instance.
TinkerPop does not officially support remote connections.
A RexsterGraph graph would be configured as follows:
<graph>
<graph-name>remotetinkergraph</graph-name>
<graph-type>rexstergraph</graph-type>
<graph-buffer-size>100</graph-buffer-size>
<graph-location>http://remoterexsterserver:8182/tinkergraph</graph-location>
<extensions>...</extensions>
</graph>
The <graph-type>
could also be explicitly specified as:
<graph-type>com.tinkerpop.rexster.config.RexsterGraphGraphConfiguration</graph-type>
The <graph-location>
element contains the URI to the specific graph hosted within the remote Rexster instance.
The <graph-buffer-size>
element defines the buffer size property for the RexsterGraph
.
There are several Sail configurations available: Memory Store, Native Store and SPARQL Repository.
<graph>
<graph-name>sailsample</graph-name>
<graph-type>memorystoresailgraph</graph-type>
<extensions>...</extensions>
</graph>
The <graph-type>
could also be explicitly specified as:
<graph-type>com.tinkerpop.rexster.config.MemoryStoreSailGraphConfiguration</graph-type>
<graph>
<graph-name>sailsample</graph-name>
<graph-type>nativestoresailgraph</graph-type>
<graph-location>tmp/data/sail</graph-location>
<extensions>...</extensions>
</graph>
The <graph-type>
could also be explicitly specified as:
<graph-type>com.tinkerpop.rexster.config.NativeStoreSailGraphConfiguration</graph-type>
The <graph-location>
element is location of the directory containing the Sail data which will be loaded to Rexster . This value is a required element of configuration.
<graph>
<graph-name>sailsample</graph-name>
<graph-type>sparqlrepositorysailgraph</graph-type>
<graph-location>http://dbpedia.org/sparql</graph-location>
<extensions>...</extensions>
</graph>
The <graph-type>
could also be explicitly specified as:
<graph-type>com.tinkerpop.rexster.config.SparqlRepositorySailGraphConfiguration</graph-type>
The <graph-location>
element is URI to the SPARQL repository which will be loaded to Rexster . This value is a required element of configuration.
A TinkerGraph would be configured as follows:
<graph>
<graph-name>gratefulgraph</graph-name>
<graph-type>tinkergraph</graph-type>
<graph-location>data/graph-example-2</graph-location>
<graph-mock-tx>true</graph-mock-tx>
<extensions>...</extensions>
</graph>
The <graph-type>
could also be explicitly specified as:
<graph-type>com.tinkerpop.rexster.config.TinkerGraphGraphConfiguration</graph-type>
The <graph-location>
element contains the location of the TinkerGraph. If this value is not specified, then the TinkerGraph will behave as an in-memory graph only. The </graph-mock-tx>
element allows the TinkerGraph to behave as a mock TransactionalGraph
. This implementation is NOT actually transactional. It is for testing purposes only.
In addition to graph configurations managed by TinkerPop, Rexster can also be configured for other Blueprints graph configurations.
- FluxGraph (coming soon)
- Blueprints MongoDB (coming soon)
- Blueprints Oracle NoSQL DB
- Titan