Yes, you can definitely use RexPro to send Gremlin to Titan. You are
certainly free to develop a connector, just know that RexPro is still
subject to change and there is no real documentation yet. I expect
those things to change in our next release, where I believe that
RexPro will be more official. I'll do my best to give you an overview
of how it works here so you can get a feeling for what it is doing.
RexPro utilizes MsgPack for serialization.
http://msgpack.org/
You should find a .NET library there that can help you. These are the
available messages that can be sent back and forth between Rexster and
the client:
https://github.com/tinkerpop/rexster/tree/master/rexster-protocol/src/main/java/com/tinkerpop/rexster/protocol/msg
These messages allow you to open sessions, send gremlin, etc. You will
find that RexPro sessions are constrained by "channels". A channel
controls the type of serialization that is returned from Rexster.
There currently are channels for MsgPack, GraphSON and Console (which
is just converts all results to a string list). All channels encase
their results within one of the MsgPack serialized messages that I
referenced above.
A working example for RexPro sessions is the Rexster Console. It uses
RexPro for it's communication with Rexster:
https://github.com/tinkerpop/rexster/blob/master/rexster-console/src/main/java/com/tinkerpop/rexster/console/RexsterConsole.java
Here's an example of use "sessionless" RexPro which is the lightest,
fastest way you can go (it uses the MsgPack channel only):
https://github.com/tinkerpop/rexster/blob/master/rexster-protocol/src/main/java/com/tinkerpop/rexster/protocol/TryRexProSessionless.java
I would suggest you start with the model exposed by RexsterClient
(which is used by TryRexProSessionless):
https://github.com/tinkerpop/rexster/blob/master/rexster-protocol/src/main/java/com/tinkerpop/rexster/client/RexsterClient.java
as that is what we've been working with most in our testing with Titan.
Here's some of the things I'm still considering with RexPro which is
why it's not quite "ready":
+ Messages formats have always seemed a bit long to me...would be nice
to trim some bytes and complexity out of there.
+ Messages basically act as envelopes for results from a Gremlin
script. The envelopes are serialized by MsgPack. So...you basically
get a situation where the results get serialized to a byte array given
the channel requested and they get pushed into the envelope. That
design evolved a bit out of my conversion to MsgPack for envelope
serialization as opposed to one I chose from the outset of building
RexPro. For some reason that's always bugged me...maybe not bad.
+ RexPro operates at a very low-level for purpose of communication
with Rexster. It's basically send Gremlin to Rexster and get back the
results. The trick with that is the results can be anything. It
might be a vertex or an edge or a string or a list of maps, etc.. The
point is that RexPro really enables the building of higher level
client libraries that can interact with Rexster in more specific ways.
For example, a JDBC library that can deal with data returned only as
tables or scalars or the Rexster Console which just treats everything
as strings or a revised RexsterGraph that works at the RexPro level.
So...if I were to start building a connector in C#, I would try to
think in those terms a bit.
I assume you will write this in C#? Will your work be open source?
If so, please point me to the repo when you have it up and running.
Best regards,
Stephen
> --
>
>