Skip to content
the-ricker edited this page Jul 19, 2012 · 3 revisions

This page discusses the design of the Neo4j client.

Client API

The client API is intended for any client implementation. It has no dependencies whatsoever on the Neo4j kernel. It is redundant to the Neo4j kernel API in many ways, but (as of version 1.8) there was no means to cleanly separate the Node-Relationship interfaces from the kernel.

Some of the methods are slightly different and I have added some exception throwing. I have tried to change as little as possible; only that which was essential to making a clean, logical client.

REST Client

The Neo4j server has a proper REST interface. It uses GET, POST, PUT and DELETE and the URL for nodes and relationships.

This Neo4j REST Client uses Apache Http Components and the FasterXML Jackson parser as its base. It translates the client method calls into HTTP requests and then parses the HTTP response into client objects.

Caching

The REST client database caches the objects that it receives. The cache uses weak references to enable garbage collection. The cache is node centric because the REST API is node centric. The nodes have strong references to the relationships, but the relationships have weak references to the nodes.

The method RestPropertyContainer.refresh will fetch the property values from the database.

Clone this wiki locally