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

Version Control - Just Do It

If you do any kind of programming that extends beyond one-liners, you need to version control your work...even if you are a lone wolf weekend warrior, like myself. Why? At least three reasons:
  • Safety. Version control backs up your code, plain and simple. Many options of course for this, but consider...
  • Time travel. A backup of your code files is one thing. A backup of your work is another. Let's take the 3-month old, 500 line script your boss wants you to run on new data. You try it on the new data, but it borks. You investigate - you have a whole new f…

Three things you must do

Tired of being a Perl script-kiddie? There are three things you must start doing with your code.

  • Use version control
  • Write tests
  • Create distributions

You say, "No need to waste my time, only people who work in teams need that."

  • Guess what, if anyone besides you will ever use your software OR its output, you're working on a software team.
  • In 3 months when the boss says, "Hey, can you run that analysis again on the new data?", you will look at the code and say "Who wrote this?". Once again, you're working on a software …

Writing the Perl I Want to See in Others

How many of you are in my shoes? There isn't much scope for Perl coding in your day job, so you find yourself furtively browsing Metacpan, checking the latest Perl Weekly on your lunch hour, and dream about getting beyond Initiate. Maybe you scribble ideas in the margins of your weekly status report for that cool lowercase mononym you'll use for your first O'Reilly book (krusty...feldspar...molewhack...). But on the weekends, you're scaling the peaks of /var/www/users/mark_jensen/index.html