This is to facilitate serializing the graph from OCaml specific marshall format to formats which other languages can understand, using the piqi library. This pull request provides an interface: Graph_code_gsoninterface, from which add_node/add_edge or add_nodeinfo/add_edgeinfo can be called (instead of from Graph_code). In addition to creating graph_code.marshall, it creates a GraphSON object (https://github.com/thinkaurelius/faunus/wiki/GraphSON-Format) fully compliant with the Tinkerpop stack. This has been tested to work with TitanDB and presumably will work with graph databases supporting the Tinkerpop stack.
Writing the graphson file is done incrementally, by appending to a file. This is to make sure that performance doesn't take a beating.
Since the piqi library is used, graph_code could also be serialized to Protocol Buffers/XML/piq (piqi's own serialization format).
I think the tests fail because I use ocamlfind (for dependencies of the piqi). Is there a way to include ocamlfind in the tests, or do we need to get it to work without ocamlfind?
This is to facilitate serializing the graph from OCaml specific marshall format to formats which other languages can understand, using the piqi library. This pull request provides an interface: Graph_code_gsoninterface, from which add_node/add_edge or add_nodeinfo/add_edgeinfo can be called (instead of from Graph_code). In addition to creating graph_code.marshall, it creates a GraphSON object (https://github.com/thinkaurelius/faunus/wiki/GraphSON-Format) fully compliant with the Tinkerpop stack. This has been tested to work with TitanDB and presumably will work with graph databases supporting the Tinkerpop stack.
Writing the graphson file is done incrementally, by appending to a file. This is to make sure that performance doesn't take a beating.
Since the piqi library is used, graph_code could also be serialized to Protocol Buffers/XML/piq (piqi's own serialization format).