I'm working on a webapp running on Tomcat which using spring-data to connect to a neo4j graph in embedded mode. I would like to use neo4j server instead of the embedded mode and I am looking for some help to be sure about how to do that. Some of my application services are quite difficult and combine, in a single transaction, the result of several cypher requests in a dto sent back to the user.
First I thought that I have to create a server unmanaged extension and I think I should follow these following steps. - Keep my webapp with springMVC and spring security to hold and secure users sessions. - Regroup all my transactional services in a specific jar my-app.jar - Use Jax-RS to add a REST access point on each of my service of my-app.jar - use something like spring restTemplate from my spring controller to call services from my-app.jar
First question : is this way of doing things is the good way ? Second question : I have many spring injection in my services layer. How can I keep them working (how can I add dependencies in the server extension ?
Then I discovered graphAware and I wonder if I should use it instead.
And finally I just read this post http://jexp.de/blog/2014/12/spring-data-neo4j-improving-remoting-performance/ and it seems that I should use the SpringCypherRestGraphDatabase (as explain in the bold text at the end of the article).
Well, I'm a little bit lost and I would appreciate any help to use neo4j server instead the embedded mode for my application which contain some complexe transactions.