Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using neo4j with scala

Tags:

scala

neo4j

I'm new to both Scala and Neo4j. I want to create a Neo4j database using Scala. Is there any resource where i can find some ready made code for creating nodes, deleting nodes, adding properties, creating indexes and etc.

Thanks.

like image 791
yAsH Avatar asked Mar 20 '13 05:03

yAsH


People also ask

Is Neo4j still relevant?

The World's Leading Organizations Rely on Neo4j. With more than 950 enterprise customers, Neo4j is the world's leading provider of scalable graph technology, enabling connected data applications for more than 75% of the Fortune 100.

What are the weaknesses of Neo4j?

Additionally, Neo4j has scalability weaknesses related to scaling writes, hence if your application is expected to have very large write throughputs, then Neo4j is not for you.

What is better than Neo4j?

TigerGraph is efficient because it needs 19.3x less storage space than Neo4j. TigerGraph is 24.8x faster than Neo4j on the one-hop path query. On the three-hops path query, TigerGraph is 1,808.43x faster than Neo4j. TigerGraph is also capable of completing a six-hops path query.


1 Answers

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

like image 83
Andy Petrella Avatar answered Sep 22 '22 13:09

Andy Petrella