-1

We have an existing graph database written in C# that we are trying to add support for gremlin queries on top of. I was looking the documentation for becoming a gremlin graph system provider here but it seems to only mention high level classes to implement, with no documentation examples. Is there any open source projects or documentation for setting up a c# gremlin server to parse even basic requests to a graph database? All examples I've found online only pertain to Gremlin.NET which seems to be just for making requests to a gremlin server, but not any for the actual implementation of it.

Norrec
  • 531
  • 4
  • 17

1 Answers1

3

I'm not exactly clear on what you're goal is, so I will try to offer some context that will hopefully clarify your situation. The first thing I note is that your graph database is written in C# and that you hope to add Gremlin support to it. Your interest in Gremlin Server tells me that you would like to leverage all the support TinkerPop has for other query languages so that your graph is available to other programming language ecosystems outside of the .NET domain (like, Python, Go, Clojure, etc).

If all that is correct then you have an important question to answer - where is the Gremlin traversal machine for your implementation? In other words, how will your graph written in C# process Gremlin queries? The issue of course is that the only publicly available Gremlin traversal machine that I'm aware of is the one written for TinkerPop for the JVM (which is probably one of the reasons that so many graphs are written with Java). You would need something similar to C#. Ultimately, you would need to develop some component in C# to natively process all of the Gremlin steps and there is no documentation that explains how to do that (mostly because the undertaking of such a project is rare and the effort itself would be time consuming compared to other user documentation tasks that are outstanding - though I think I'd admit that better design specification of "all the steps" might be a worthy effort rather than "how to process them".)

I think that from the way you've written your question you largely understand that much and that you expect to be implementing Gremlin steps in C# for your graph. In that case, this question is more about how to leverage the various programming language drivers by implementing Gremlin Server protocols to query your graph. If that is the case, then the best we have for that is described in the Provider Documentation. If you implement that websocket protocol on your server you will be able to allow all the different Gremlin Language Variant implementations to connect to your graph. I suppose that you will need to reverse your thinking a little bit when reading that section as it is largely written from the perspective of a driver developer but it does explain what drivers should expect in the way of communication with the server.

I'd recommend that you subscribe to the TinkerPop dev list and perhaps announce your work on this project (I think subscribers would be interested to know) and ask follow-up questions as needed in that forum.

stephen mallette
  • 45,298
  • 5
  • 67
  • 135