Using neo4j with scala

Actually there are several options it depends on (a) how you want to communicate with neo4j (Rest or not) (b) your runtime environment.

When your application is ok with a REST only communication and you're ok to use ANORM to access your (data). There is a promising driver that is currently good enough to do a plenty of thing using Cypher as request language. You can find it there (AnormCypher) : https://github.com/AnormCypher/AnormCypher. The power of ANORM is a source of a lot of debate, but I think it has a lot of good feature.

There is also the FaKod scala driver which is very complete, and the second version (M1 for now) will include REST capabilities as well. The power of this driver (neo4j-scala) is the clean DSL it provides to abstract traversal internals, it's pretty intuitive and well documented.

On the other hand, I had started my driver a while, but didn't had time to put much effort of it (it'll change soon). The current version is still rough and tightly coupled to a play application. But this driver tries to use amap the reactivity of future (now akka based) and the json api of play. However, this way shall not be the most productive due to a lack of doc and cleaning... any help is welcome ;-). Also this is a play plugin as well then is pretty easy to configure and inject.

For more information in general regarding drivers, you should go there: http://www.neo4j.org/develop/drivers


You might want to have a look at gremlin-scala. It uses the Tinkerpop stack which is essentially like JDBC for relational databases. You can use it with a number of graph databases including Neo4J. There are some basic examples on the github page and far more in the gremlin wiki.

Disclaimer: I'm the maintainer of gremlin-scala ;)

Tags:

Scala

Neo4J