Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
conf
data
Gemfile
README
clean.sh
config.yml
myapp.rb
start_zookeeper.sh

README

A simple High Availability Cluster Example
==========================================

To run this:

0. First you need the neo4j enterprise JAR files
  mkdir -p lib
  bundle install
  bundle exec ../../bin/neo4j-jars enterprise

1. type: ./start_zookeeper.sh
This starts 3 java processes (ps -ef | grep java)

2. type: irb

3. type: require 'myapp'
This defines the method start which configures neo4j.rb database as a HA database.

4. type: start 1

5. Open a new command prompt

6. type: irb

7. type: require 'myapp'

8. type: start 2

9. type: Neo4j::Transaction.run { Neo4j.ref_node[:foo] = 'bar' }

10. Goto the first irb process again

11. type: Neo4j.ref_node.props.inspect

Notice that you only can do modification slaves. You should not write to the master.
The master machine is usually the machine that starts first.

If you need to start with a new database, you should clean the zookeeper data folders, type: clean.sh

For more info, see http://wiki.neo4j.org/content/High_Availability_Cluster


Something went wrong with that request. Please try again.