Skip to content
This repository has been archived by the owner on Jun 4, 2019. It is now read-only.

Serializes graph from pfff to JSON (GraphSON) format #129

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

krishnavaidy
Copy link

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).

Krishna Vaidyanathan added 5 commits July 2, 2015 12:49
interface graph_code_gsoninterface.ml. Instead of using the add_edge and
add_node functions from graph_code.ml, same functions can be used. Both
GraphSON file and graph_code.marshall is created.
@krishnavaidy
Copy link
Author

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants