Merge: neo4j: Introduce an API for graphs
authorJean Privat <jean@pryen.org>
Tue, 13 Jan 2015 01:28:41 +0000 (20:28 -0500)
committerJean Privat <jean@pryen.org>
Tue, 13 Jan 2015 01:28:41 +0000 (20:28 -0500)
commiteb6684fd33a5f4dc6707a291ca0ae7d4d1f10f6c
treeef85b951f3358e54d90d74b4f4a7e9ddbdcd0c2a
parentd1659cf535fddec9c383abe1195365c108dc7fa1
parente9f29220416c946c183e3a6fda9afdd55c4bd841
Merge: neo4j: Introduce an API for graphs

You have waited for it. Now it comes: the Neo4j graph API.

## Features

* Customizable identification scheme: You have power on how IDs are generated and which property is used to store it. For the moment, only one scheme is provided: sequential IDs.
* Customizable storage mechanism: You have power on where and how your graph is saved. You can then reload your graph at will. For the moment, two storage medium are provided: Neo4j and JSON.
* Partial loading and saving: For when you do not want put all your eggs in one basket.
* Progression tracking: You can track the progression of a long-running operation (like saving thousands of nodes in a Neo4j database) and display it to your users the way you want.

## What is included

### The API itself
* progression: Add an API for progression tracking.
* neo4j: Add an API for graphs.
* neo4j/graph: Add node removal methods.
* neo4j/graph: Add optimization methods.

### Neo4j as a storage mechanism
* neo4j/graph: Add Neo4j as a storage mechanism.

### JSON storage mechanism
* json: Factorize the trivial implementation of `to_json`.
* stream: Optimize `StringIStream.read_all`
* neo4j/graph: Add a JSON storage mechanism.
* neo4j/graph: Enlarge in advance when loading from JSON.

### Sequential identification scheme
* neo4j/graph: Add a sequential identification scheme.
* neo4j/graph: Optimize some services of `SequentialNodeCollection`.
* neo4j/graph: Implement optimization services of `SequentialNodeCollection`.

### Garbage collection :smile:
* neo4j: Remove `json_store`.

## Comming soon in a future PR near you
* Refactoring of `/src/neo.nit` and of `neo_doxygen` to use the new API.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

Pull-Request: #1062
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>