What are the advantages of using Spring Data neo4j over just using neo4j directly?
Asked Answered
T

1

6

I am brand new to NOSQL databases (or any kind of database) and I need to build a graph database in Java. I have never used SpringSource before either. Will using Spring Data neo4j make the process of creating a graph database easier or will it complicate things? Should I just try to work with neo4j directly? Thank you very much.

Taeniasis answered 20/4, 2012 at 18:44 Comment(0)
E
5

It depends on your use-case. SDN is a good fit when you are already working in a Spring Environment and have a rich domain model which you want to map in the graph. SDN is a good fit in all the cases where you mostly work with a results of a few hundred or thousand POJO objects which have to interact with existing libraries, ui-layers or other application parts that deal with POJO's.

If you're not working in a Spring environment it is up to you, it adds some complexity in setup and dependencies. There are also other solutions like jo4neo or Tinkerpop Frames that work on top of Neo4j.

It is a slower than the native Neo4j API due to the indirection introduced.

For highest performance you can always fall back onto the Neo4j API.

In general the Core-API is fastest, a good thing in between is the cypher-query language which is very expressive.

Evanevander answered 21/4, 2012 at 0:26 Comment(3)
I'm not already working in a Spring Environment and I really just want the neo4j functionality so I'll try working with the Core-API or cypher-query language. Thank you very much!Taeniasis
Sadly SDN adds a lot of latency. A Cypher @Query that takes 4ms on the Cypher shell takes 1700ms (including iterating across the 150 returned int's) through Spring on the same machine. So, the slow down from SDN put my query back to the same time it ran in on my RDBMS. :(Trichroism
Depends on the mapping mode, could you share your setup and your queries for me to have a look at it?Evanevander

© 2022 - 2024 — McMap. All rights reserved.