This is an Apache Tinkerpop3 Gremlin client library.
See the official tinkerpop3 and gremlin docs:
This client library is implemented following the driver provider requirements:
Published: 26 Jul 2019
OCaml Gremlin Client
Given this is my first public OCaml library and I was fairly rushed, it's not pretty.
I'd like to improve it which probably means completely refactoring it but I'm not sure when I'll get the chance. In the meantime, any suggestions or PRs are welcome.
git clone https://github.com/bramford/ocaml-gremlin cd ocaml-gremlin opam pin add .
Assuming you're running a gremlin server on
localhost:8182, in a toplevel such as
#require "gremlin";; let conn = Gremlin.Websocket.new_connection (Uri.of_string "http://localhost:8182/gremlin") (* Add vertices *) let add_vertices = Lwt_main.run ( Gremlin.Websocket.run_queries_transaction conn ["g.addV('user').property('name', 'foo')"; "g.addV('user').property('name', 'bar')";] ) (* Get vertices *) let get_vertices = Lwt_main.run ( Gremlin.Websocket.run_query conn "g.V()" ) ;;
examples/ for other examples.
There's obviously a lot to improve but here are some starting points:
[ ] Properly close gremlin session on completion
[ ] Handle streamed responses
[ ] Add interface documentation (e.g. odoc)
[ ] Implement proper logging (e.g. using
[ ] Improve types and results
[ ] Abstract internals and types properly
[ ] Refactor/improve response handler (currently uses
[ ] Refactor response JSON checking/parsing
[ ] Improve concurrency (currently all serial using
[ ] Support other serialization formats (e.g. bytecode)
[ ] Support Traversal OpProcessor
[ ] Support REST interface
[ ] MirageOS compatibility