We have a Ruby-based application on Heroku with a largely static neo4j graph (we connect to it via the neo4j heroku add-on) that we want to use for advanced searching/data exploration. For some of the features we want to implement, we'd like to know the (eigenvector) centrality of each node, and we'd like to cache that centrality on each node after we generate the graph.It seems like neo4j has the graph centrality algorithms we're looking for built-in. However, we aren't sure how to use the REST API to ask neo4j to run any of those algorithms.So, our questions:
- Is it possible to use the REST API to ask neo4j to calculate the eigenvector centrality of each node (and store that as a property on every node)?
- If not, would we have to generate the graph on a server we can actually access, then write some Java to get the information we want?
Thanks for any help.Andrew
However, performance isn't a huge consideration for us, because our graph is relatively small and readonly -- we want to calculate centrality just once, when the graph is generated. If it takes half an hour, that's regrettable but not terrible. However, doing that over the REST interface seems tricky.
Yes,
For complex stuff, Groovy/Gremlin is a full scripting language with all the pros and cons of sending arbitrary scripts to the server.
/peter
Send from mobile.