Neo4j 1.4 “Kiruna Stol” GA

Over the last three months, we’ve released 6 milestones in our 1.4 series. Today we’re releasing the final Neo4j 1.4 General Availability (GA) package. We’ve seen a whole host of new features going into the product during this time, along with numerous performance and stability improvements. We think this is our best release yet, and we hope you like the direction in which the product is heading.

Cypher Query Language

For some time now Neo4j has supported the Gremlin query language for traversing graphs. To complement that, we’ve introduce a new language called “Cypher” which provides humane, DBA-friendly syntax for graph queries. With Cypher, queries can often be easily expressed, for example this Cypher query finds friends-of-friends concisely:
START user = (people-index, name, "John")
MATCH user-[:FRIEND_OF]->()-[:FRIEND_OF]->fof
RETURN fof
While Cypher can’t yet mutate graphs, it’s a really powerful and interesting way of exploring, and drawing business intelligence of your data.

Automatic Indexing

Neo4j’s index framework is powerful and tightly integrated with the database, but there are times when you’d gladly trade some of that power for a little less effort. And that’s where auto-indexing comes in. With a little configuration the auto-indexing framework will take care of managing the lifecycle of index entries so that they’re consistent with the data in the graph.

The auto-indexing framework allows us to declare that specific properties in nodes and relationships should be indexed. As those properties are created, updated, and removed, so too the corresponding entries in the index change.

To create an auto-index in code:
AutoIndexer nodeAutoIndexer = graphDb.index().getNodeAutoIndexer();
nodeAutoIndexer.startAutoIndexingProperty( "model" );
nodeAutoIndexer.setEnabled( true );
Now any nodes with the property called “model” will appear in the auto-index. This auto-index can be accessed and queried in a similar way to regular indexes:
ReadableIndex autoNodeIndex = graphDb.index().getNodeAutoIndexer().getAutoIndex();
And while we’ve only shown node indexes here, of course the same functionality applies to relationships.

Index Improvements

In this release we’ve taken the opportunity to upgrade to Lucene 3.1. This means index operations will be faster thanks to the hard work of the Lucene community. However the transition to Lucene 3.1 indexes means an irreversible change to index stores – so ensure you’re ready to upgrade your indexes before switching to the 1.4 GA release, and keep a backup of your data!

Self Relationships

When modelling domains, entities which refer to themselves are somewhat common. For example, the self-employed are their own bosses. In previous versions of Neo4j we’d model that with two relationships and a (dummy) node. It worked but it was less expressive than we liked.

Our community have lobbied about this, and we’ve listened. So, from this release Neo4j supports relationships whose start and end nodes are the same. So for those lucky people who are their own boss, you can now express subgraphs like:

Albert-BOSS_OF->Albert
And the database will happily persist that structure and make it available for traversals.

Performance Improvements

Down in the engine room our kernel hackers have been busy. Our boffins have implemented new directional caching strategies and tweaked the code path to make small transactions (especially) much more efficient. This all adds up to a substantial performance improvement and a database engine that feels a whole lot snappier.

REST API Improvements

In the Neo4j server, we’ve been pushing the REST API forwards. To that end, we now have batch behaviour exposed so that large bundles of commands can be executed efficiently on the server, thereby paying the network penalty only once.

We’ve also included a paging mechanism for traversers. Any traversals that you execute on the server can return their results in pages rather than as a single large chunk. This means traversers can be terminated early (when enough results have been gathered) and provides more manageable chunks of data to work with, making the server more efficient (as well as taking the pressure off clients).

Finally we’ve made REST indexes on a par with the embedded indexes, and from this release the same arbitrary queries and index management supported in the Java APIs are available to our community of RESTafarians too!

Webadmin Improvements

Our browser-heads have been plugging away, knee-deep in coffeescript and CSS, and the results show. The Webadmin tool that comes with the server is looking better than ever. With this release, there’s a new index manager tab that allows DBAs to fully control indexes on the graph with a friendly point-and-click interface.

We’ve also expanded the set of consoles available. To compliment the existing Gremlin console, we’ve added a Cypher console. This means to get up and running with Cypher it’s as simple as downloading Neo4j, running the server, and opening a Web browser!

For our RESTafarian friends, we’ve also created a neat HTTP console that allows users to create simplified curl-like commands that can be executed against the server. This is extremely useful as a REPL for exploring the REST API and testing extensions and plugins.

New Server Management Scripts

Ever since we first released Neo4j server we’ve used 3rd party libraries and scripts to help users manage the service. Unfortunately both of the 3rd party wrappers we’ve used have been painful for everyone concerned. So late in the 1.4 release cycle we switched out those wrappers and provided much simpler bash (if you’re on a Unix variant) and command scripts (if you’re on Windows) instead – much nicer!

Ready to go!

The 1.4 GA release is now available through our download page, and the components have been pushed out to the Maven central repository. Remember, we always value your feedback over on the community mailing list, but in the meantime we wish you all happy hacking!

 

Keywords:  


5 Comments

James says:

Congrats for the release!<br />What about setting the autoindex for the server version? Is there a new rest call to make or is it done in the config files?<br />One thing I&#39;d love to see is to have in the traverse returned relationships data the distance/depth from the starting node, that would be very useful to know immediately how much far is that relationship from the start, without having

Omer Katz says:

What about django/python support? What about the experimental solr support? Have you deprecated them?

mhermans says:

Thanks for the hard work!<br /><br />I share however Omer Katz sentiment a bit re. Python. Half a year ago the Python bindings <a href="https://trac.neo4j.org/ticket/302&quot; rel="nofollow">were promised &quot;some serious love</a>&quot;.<br /><br />Relying on third-party projects for the Python bindings that constantly need to play catch-up (through REST) with the neo4j releases leaves me a bit

pablopt says:

Congratulations for the new release ;)<br /><br />I&#39;m so happy to finally have access to self-relationships!<br /><br />when will relationships&#39; fetching performance be not dependent on the total number of rels associated to a node? maybe next release?!<br />cheers!

Anton Kulaga says:

It would be great if you add hirercial properties support in future versions (properties like { &quot;fied&quot; : { &quot;subfield1&quot; : &quot;value1&quot;, &quot;subfield2&quot; : &quot;value2&quot;}} )

Leave a Reply

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

Stay Connected

Go
 

Have a Graph Question?

Stackoverflow
Contact Us


Popular Graph Topics

Archives