Note: lists.lfaidata.foundation will be down for maintenance on Monday, September 26th, starting at 9AM Pacific Time (4PM Monday September 26, 2022 UTC), for approximately one hour.
- Best practice setup for Go driver development & identifying the websocket serialization format
Re: Best practice setup for Go driver development & identifying the websocket serialization format
toggle quoted messageShow quoted text
The server serializes the response in whichever format has been requested by the client. I'd imagine what you're seeing would be the unmarshalled version of the returned JSON that your go websockets library created.
On Friday, August 4, 2017 at 3:40:44 PM UTC-4, Ray Scott wrote:
I want to develop a driver in Go that connects to Gremlin Server using a websocket, runs a parameterized Groovy script and parses the response. At this stage all I need to do is perform basic queries and modify the graph. I've read through the documentation on driver development, and looked through some source code for existing drivers.
Connecting and sending the data is the easy part. What I can not find anywhere, is an explanation of what I can expect to receive back in terms of the serialised format. I'm actually using JanusGraph straight out the box. I've looked at the yaml config and read some posts on the serializers listed therein. I've read a little about GraphSON and GraphML and Kryo and all I'm really looking for is a way to setup the server so that it returns a response thats some sort of official spec'd format that I can work with in Go. The only other thing I need to do, is be able to use the console as normal.
As an example, if I send this query...
graph = JanusGraphFactory.open(cassandra)
g = graph.traversal()
I receive this...
[[map[id:8376 label:demigod type:vertex properties:map[name:[map[id:2s7-6go-sl value:hercules]] age:[map[id:36f-6go-35x value:30]]]]]]
What format is that? How do other driver developers handle this? Do I need to change the settings of the serializers in the yaml config? Do I use a writer in the Groovy script to serialize the result into a format of my choice? I don't want to perform any unnecessary serialization.
Join email@example.com to automatically receive all group messages.