Over a million developers have joined DZone.

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!

· Database Zone

Build fast, scale big with MongoDB Atlas, a hosted service for the leading NoSQL database. Try it now! Brought to you in partnership with MongoDB.

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:

  1. Create a Server Plugin (or Unmanaged Extension, depending on what you're trying to accomplish).

  2. Install and test the plugin on the server.

  3. 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

  • Warmup

  • Monitoring

  • Graph Refactoring

  • Spatial

  • Date/Time Support

  • 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!

Now it's easier than ever to get started with MongoDB, the database that allows startups and enterprises alike to rapidly build planet-scale apps. Introducing MongoDB Atlas, the official hosted service for the database on AWS. Try it now! Brought to you in partnership with MongoDB.

neo4j ,stack overflow ,questions ,answers ,stored procedures ,cron

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}