Stack Overflow Roundup: Neo4j (Stored Procedures and apoc)
Looking for your weekly fix of what's going on in the world of Neo4j on Stack Overflow? Well, look no further as it's that time of the week again!
Join the DZone community and get the full member experience.Join For Free
It's once again time to open up Stack Overflow to check out the latest questions in the world of Neo4j.
This week has seen a substantial decrease in the number of questions related to the release of Neo4j 3 as well as the adoption of the Bolt-based drivers. Sure, there are a few such questions outstanding, but nothing really exceptional.
However, one rather new area of Neo4j is the inclusion of what amounts to stored procedures. One question posed earlier this week covers an area common to several DBMS solutions, namely that of running scheduled queries.
You can check out the original post here: Neo4j query run at specific time.
The accepted answer introduces a very handy series of libraries called "awesome procedures for Neo4j 3.0," codenamed "apoc."
In amongst those libraries is a job management one, allowing for periodic calls of Cypher queries without the need to set up cron jobs. Previously, you might have had to something like the following:
Create a Server Plugin (or Unmanaged Extension, depending on what you're trying to accomplish).
Install and test the plugin on the server.
Write a cron job that calls out to the plugin on the server.
This may seem simple enough, but keep in mind there is a formula to be followed at each step that may introduce a bit more fragility than some would like.
Regardless, reducing everything into a single call in the actual database introduces a new level of power for Neo4j.
What Else Can "apoc" Do for Me?
The answer to this question is too long to answer here, so check out this link for a complete listing.
To whet your appetite, though, here are a few different libraries that are included:
Interacting with Elastic Search
Parallel Node Search
It's great to see these useful functions added to the core offering of Neo4j 3 as there are several common goals that can be addressed in a single location.
See you next week!
Opinions expressed by DZone contributors are their own.