Wednesday, February 11, 2009

First complete Neo4j sample app

The IMDB example 1.0, a Neo4j-based web application using part of the IMDB actors/movies dataset, has been released. The application lets the user search for or browse through actors and movies. For actors, it also shows their Bacon path as well. Here's how it can look:

The application itself is accompanied by thorough instructions and explanations. This way you can learn how to model a domain using the graph database paradigm inherent to Neo4j. Other important points is organizing data for searches, finding paths and handling transactions.

One nice thing about Neo4j is its whiteboard friendliness. This is a sketch of the IMDB domain model ... no, wait, it's the implementation:

The application itself is based on Spring Framework and packaged using Maven 2.

For those who want to get started right away, here's a quick how-to (requiring mvn and svn to be already installed). Enter the following at the command line (all at once):

mkdir imdb && 
cd imdb &&
mvn scm:checkout -DconnectionUrl=scm:svn: &&
cd target/checkout &&
mvn jetty:run

Then browse to http://localhost:8080/imdb/setup.html to load the data and use the application. Use ctrl-c in the same console to stop the application.

From the main page of the Neo4j IMDB example you will find your way to the location of downloadable zip files as well if that's what you prefer.

1 comment:

raenur said...

In chrome on mac os x, the subversion url actually appears truncated, and that can cause a little confusion. I ended up using, which put me in the wrong part of the tree. I wasn't able to see the full