Ok,
So I'm unsure of how to reply to a message gotten through dev-get. To avoid making a mistake and creating another thread I'm simply going to post my information here for the time being. If you've got any idea on how to, feel free to let me know. In any event I'm now subscribed and should be able to participate in future threads and in this one in particular as soon as another message is made.
Feel free to add this to the dev mailing list thread.
Just to clarify a bit because my previous messages danced around the main issue (though from your response you're well aware already) :
This is in fact a blocking point for anyone using the JSON serializer and binds with gremlin-server.
JSON data types are limited and involve lossiness. Consider the following "args" of a gremlin driver message using the JSON serializer:
{
"BIND1": 12, // Interpreted as Integer
"BIND2": 12.05, // Interpreted as BigDecimal?
"BIND4": "12L", // Interpreted as string
"BIND5": 12L, // Error illegal
So in essence it's impossible for anyone using gremlin-server with the JSON serializer to addVertex() and then find that vertex via g.V(BIND*). Unless the vertex ID > 2^31-1 . Whoops :|
I personally like option 1) best in your response. I can't really think of any downsides other than situations with conflicting IDs (v[12] & v[12L] residing in the same graph). I'm not too sure which scenario would have such a case. Maybe importing graphs with int IDs and relying on addVertex() for any further insertions would be a problem. I can see this happening when users migrate over to TP3.
In any event, numerical strings should stay strings though.
2) This has the advantage of keeping communication logic and issues on the serializer level but I feel like there is no clean way of ensuring correct interpretation in all events.
3) The use of embedTypes(true) as is can actually help if the drivers support it. But for languages that don't have equivalent datatypes there's still a lossiness issue. We would have to create objects that would emulate these datatypes. This is language dependent and for instance not easily doable in PHP.
How did Rexster handle this? Did addVertex() also set IDs as longs in TP2?