Categories
Uncategorized

using remote shell combined with Neo4j embedded

Neo4j can be deployed in multiple ways. Either you can run it as a server in a separate process, just like a classic database, or you can use embedded mode where your application controls the lifecycle of the graph database. Both, embedded and server mode can be used to setup a HA scenario with Neo4j enterprise edition.

In cases where Neo4j is used in embedded mode, there is often a demand for having a maintenance channel to the database, e.g. for fixing wrong data. Nothing simpler than that, there’s an easy way to enable the remote shell together with embedded mode, see a example written in groovy:

[gist id=”8470566″]

The trick is to

  1. have the neo4j-shell-<version>.jar on your classpath and
  2. pass in the config option remote_shell_enabled='true'

With this in place you can use the bin/neo4j-shell from your Neo4j distribution and access your embedded instance.

 

Leave a Reply

Your email address will not be published. Required fields are marked *