REST::Neo4p catches up to Neo4j V4.0+

For a long time (since 2012), REST::Neo4p has provided a way for Perlers to play, and even work, with the graph database Neo4j.

Neo4j has made many changes and improvements in its server and its query language in that time. However, as it has become successful commercially, it has made breaking API changes of one kind or another more and more regularly. In the last major release, version 4.0, Neo4j retired the REST endpoint on which REST::Neo4p was based. This endpoint was "entity-based", as it were, allowing direct access to nodes, relationships, and the like via entity IDs. It was well suited to the object (HAR HAR) of REST::Neo4p. But Neo4j decided to focus exclusively on its declarative query language Cypher, and to move away from the "graph walking" paradigm that the REST endpoint represented.

It was at this point that I hoped that REST::Neo4p could finally go on to its heavenly reward. But, alas, there were folks still using it who were bummed that it didn't work with 4.0. Thankfully, Arne Johannessen (AJNN) created Neo4::Driver, that does an excellent job of realizing the latest Neo4j "language driver" conventions. It also is based on the new server's so-called "HTTP" endpoint. This endpoint should last for at least a couple of years.

Thanks to Neo4j::Driver, REST::Neo4p 0.4000 can be used with Neo4j 4.0+ (as well as earlier versions with the HTTP endpoint), with almost all of its object mapping features in place. Ideally, it should just work with 4.0. If it doesn't, please create an issue.

The Neo4j::Driver "agent" in REST::Neo4p is really an emulation, using Cypher queries, of a large fraction of the original REST API. It probably is the limit to which the ideas can pushed. From here, Neo4j::Driver is the way forward in Perl 5, based as it is on declarative queries.

I hope the latest version will help those few folks who have come to REST::Neo4p over the years make the transition. It should allow you to avoid replicating your working code with a ton of irritating little frigging cypher queries everywhere. Since I did it. Yes, I do want a medal. Or maybe a fish slap.

By the way-- Neo4j's custom protocol over TCP - called Bolt - is a key component of their architecture, and I expect that the Bolt endpoint will ultimately rule them all. Arne and I are working on that; see, e.g., Neo4j::Bolt. A topic for another time.

glhf

Leave a comment

About Mark Jensen

user-pic Getting there from here. CPANID: MAJENSEN