Neo4j 1.2 Milestone 2 – One More Step


With a pebble in your shoe, every step distracts you from where you’re going. For a short walk, the pebble might be tolerable. But the longer the walk, the more the pebble becomes a problem. When strutting around with Neo4j, you should be comfortable, get where you’re going quickly, and look good doing it. With this release, a little sand is being emptied from the Neo4j track shoes.

The Neo4j 1.2 milestone 2 release features an integrated indexing API, faster graph operations and fixes for shutdown problems.

Community shout-out


Thanks to the awesome Neo4j community for helping to get this second milestone ready. From feedback to code contributions, the project continues to flourish with the help of an active community of contributors.

Integrated Indexing

The indexing API always felt a little bolted-on-the-side. We’ve thought about that, iterated over some refinements, discussed with the community and come up with a similar API that is a more natural part of the GraphDatabaseService. The new indexing had been available as a laboratory component, so some of you may already have been using it. Now, it is part of the official release.

What’s different? Well, the operations are much the same, but now the GraphDatabaseService has been paired with an IndexManager that provides Indexes through a more fluent API. Indexes can now refer to Nodes or Relationships, use values from multiple keys and do compound queries. It’s quite powerful.

Also, a subtle but significant benefit of the integration: the index service participates in the shutdown of the GraphDatabaseService. You no longer have to worry about having a separate index shutdown.

Oh, the original indexing is still available, and the two can actually live side-by-side. You can transition over whenever you’re ready.

Performance Improvements


Where the integrated indexing removes some irritation, the kernel improvements put more spring in your step. The changes are behind-the-scenes optimizations to caching and some prep work for high-availability (the kernel is now HA-Ready™). No tweaking needed, just bump up to 1.2.M02 and enjoy better performance from your graph operations.

Shutdown, Now. Really.


In the previous milestone, the GraphDatabaseService had two problems with actually shutting down when asked to do so. And worse, nobody noticed until the release was out. Community members brought it to our attention on the mailing list and even started investigating the causes. A shout-out of thanks to our alert and good-looking contributors.

The usual problem response unfolded: investigate, replicate, fix-ate then validate. The fixes for both shutdown problems are included in this release. Your JVM should now exit as expected. And, there is now an integration test which spawns a JVM to make sure the problem doesn’t happen again.

This experience prompted some reflection about testing.

Test-ify


While the joy of writing tests may be debatable, everyone appreciates the benefits of having comprehensive testing. All of the Neo4j components have unit tests. There are machines conducting long-running concurrency and performance testing. Now, there is an increasing suite of integration tests to check inter-component operations and even full JVM startup/shutdown behavior. Hooray.

You probably do testing as well. Probably, you have to set up some of the same test fixtures, test harnesses or other test infrastructure that everyone else who is working with a graph. Probably, it’s similar to what is used for testing the components. So we’ve started to think about testing as a deliverable.

As a first small step in that direction, you’ll find a “tests” directory in the milestone download. The code there shows common practice for unit testing a graph application. Looking forward, we may provide base classes and common utilities to make testing so easy to do that even the most begrudging test author won’t mind doing it.

Lace up


Try out the new milestone and let us know what you think. Bring up any “more of this” or “less of that” comments on the mailing list. Together, we’ll keep taking out the pebbles.

Cheers,

Andreas




Want to learn more about graph databases? Click below to get your free copy of O’Reilly’s Graph Databases ebook and discover how to use graph technologies for your application today.

Download My Ebook