neo4j server version - traversal framework and number of http requests - neo4j

I know that neo4j database can be used both as embedded or server.
In neo4j documentation it says that REST API has an endpoint for Cypher queries, so if I issue Cypher query using spring-data-neo4j #Query annotated method, this query is sent to the database, executed on database side and then the result is sent back.
What about traversal API then? If I would submit traversal description using
findAllByTraversal(N startNode, org.neo4j.graphdb.traversal.TraversalDescription traversalDescription)
does it send all traversal description to the server and executes it in server context (so there it is only one HTTP request)?

Traversal API (package org.neo4j.graphdb.traversal) is only available via Java API. To expose your code using traversal API via REST, the recommended way is to wrap it into a unmanaged extension.

Related

How do I create a GraphQL API that resolve to a cypher query?

I am designing an API for a prototype project we have created that uses AgensGraph as the graph database. Now that we have a working graph database, we need an API (RESTful or GraphQL) that can be used to query the graph without directly using a cypher query. I am looking into using GraphQL. It appears that Neo4j has a GraphQL to Cypher resolver. Is there a similar way to create a GraphQL API for AgensGraph?
There is nothing that I'm aware but ...
There is a graphql plugin for postgres, and AgensGraph is based on PG
you can fork the neo4j-graphql-js project, and change the driver. This project is a Cypher generator for a GraphQL schema, but it uses Neo4j as a backend.
Otherwise try Neo4j :)

Spring Data Neo4J - Create new nodes via REST endpoint

Does Spring Data provide a way to create new nodes via a REST endpoint? I don't think so but would like to make sure.
Which version are you referring to?
SDN works in both versions also with Neo4j server but using the Cypher Endpoint under the hood.

Neo4J REST API's

I need some conceptual understanding of Neo4j REST api's usage. I went through the tutorial of neo4j RESt api and got some idea. So is it like these REST api's are used only to CREATE nodes and Relationships and also to fetch data from the neo4j graph database? So can you give me one example/scenario where and how these neo4j REST api's are used?
Thanks,
Shree
Historically the very granular REST API calls for e.g. creating nodes, setting properties were there before Cypher was established. Cypher is a way more concise and compact way to query and modify the graph compared to the granular REST calls. These days you typically use Cypher over the transactional http endpoint.
For some usage examples refer to the manual as well.

Which server is affected when we use Neo4j traversal API?

Maybe a silly question :)
If we use separate physical servers for Application and Database, when using Traversal framework, which one of the servers should support the queries (DB or Application)?
Neo4j traversals run on the Neo4j database server, if you are using the server version of Neo4j.
Disclaimer: I'm building a similar system right now, so my view is probably biased.
My Node.js Application server provides an Angular app from the /public folder. The client application speaks only to the Application server.
Generally it works like this:
Client sends a message to Server.
Server returns a promise to client.
Server queries the DB, performs any necessary manipulation to the data.
Server resolves the promise.
Client interprets the response.
hope that's helpful.

How to connect to neo4j server in spring via rmi?

How to connect to neo4j server in spring via rmi? I found http://mvnrepository.com/artifact/org.neo4j/neo4j-remote-graphdb. Is it component neo4j-remote-graphdb supported?
You can connect with that library, which is also in http://github.com/neo4j/java-rest-binding
But you shouldn't use individual operations over the wire for higher performance operations, use Cypher instead (using RestGraphDatabase.query(query, params)) with Cypher Parameters.

Resources