Wiki
Clone wikibitsy / IntegratingWithRexster
Integrating with Rexster
You can follow these steps to integrate with the Rexster Graph Server:
- Copy the Bitsy jar and dependencies to the ext/ folder under rexster-server-[version]-standalone/ext
- bitsy-rexster-[version].jar (from Downloads)
- bitsy-[version].jar (from the local Maven repository, or Downloads)
- jackson-core-2.1.2.jar (from the local Maven repository, Downloads, or the Jackson web-site)
- jackson-databind-2.1.2.jar (from Maven dependencies, Downloads, or the Jackson web-site)
- ness-core-1.5.0.jar (from Maven dependencies, Downloads, or the grepcode website)
- slf4j-api-1.7.3.jar (from Maven dependencies, Downloads, or the SLF4J website)
- Configure the graph as follows:
<graph> <graph-name>bitsygraph</graph-name> <graph-type>com.lambdazen.bitsy.rexster.BitsyRexsterConfiguration</graph-type> <graph-location>... path to Bitsy folder ...</graph-location> </graph>
- (Optional) You can use the tags allow-full-graph-scans, tx-log-threshold and reorg-factor to tune the database
Debugging with Rexster
Rexster and the Doghouse provide a simple way to analyze, debug and fix the graph database. You can point Rexster to a copy of the Bitsy database directory to look at the contents of the database. You can also run Gremlin queries through this interface to come up with the correct queries.
Here is a screenshot showing a Bitsy database in Rexster's Doghouse web-interface.
Integrating your application with Rexster
Since Bitsy is an embedded database, only one Java application can access the database in a folder, at a time. So when Rexster is running, you can only access and modify the database through the REST and binary APIs provided by Rexster. This will be slower than directly embedding Bitsy in your application.
If you would like to use Rexster on a production database, you can create a RexsterConfiguration class for your Bitsy application and start up the application along with Rexster. Here is a template for the configuration class:
public class FooRexsterConfiguration implements GraphConfiguration { public Graph configureGraphInstance(Configuration properties) throws GraphConfigurationException { // Startup your application // Get a reference to the BitsyGraph instance, say fooGraph return fooGraph; } }
You can refer to the code to standalone Bitsy Rexster configuration here.
Updated