Skip to content
mdeiters edited this page Sep 13, 2010 · 8 revisions

Neo4jr-Social is a self contained HTTP REST + JSON interface to the graph database Neo4j. Neo4jr-Social supports simple dynamic node creation, building relationships between nodes and also includes a few common social networking queries out of the box (i.e. linkedin degrees of seperation and facebook friend suggestion) with more to come. Think of Neo4jr-Social is to Neo4j like Solr is to Lucene.

Neo4jr-Social was built in JRuby but is language agnostic and is designed to run on it’s own under a Jetty or Tomcat configuration.

All responses are JSON. When using the service from a browser the response will be formatted as html to be even more human readable.

Prerequisites

  • Java
  • JRuby: http://jruby.org
  • jruby must be in your $PATH

Install & Run

To install execute the following form terminal:

gem install neo4jr-simple neo4jr-social

After installing neo4jr-social (via gems) an executable ‘start-neo4jr-social’ should be in your $PATH. This will start the service and the database and listen for HTTP requests on localhost at port 8988 by default:

start-neo4jr-social

Run start-neo4jr-social —help to see all options

Configuring a database location

neo4jr-social connects to a neo4j database or creates a new one whenever you start the service. If no database is configured neo4jr-social will do this using a temporary directory which will be destroyed when you shutdown your server. You have a few options to specify a more persistant location for your neo4j database.

As a command line argument

You can use the -d parameter when start neo4jr-social:

start-neo4jr-social -d~/some/relative/or/absolute/path

Specify the neo4jr_database environment variable

export neo4jr_database=/path/where/you/want/your/neo4j/db/to/be/created

Or the more Java like way would be to configure a system property

neo4jr.database
Clone this wiki locally