jbmusso / gremlin-javascript

JavaScript tools for graph processing in Node.js and the browser inspired by the Apache TinkerPop API
MIT License
214 stars 63 forks source link

Vertex Properties not working #19

Closed adurrive closed 8 years ago

adurrive commented 8 years ago

This one seems to come from the Gremlin server (no apparent response):

var client = gremlin.createClient();

client.execute('g.V().next().properties()', function(err, results) {
  console.log('hello');
});

I use .properties('a','b', ...) to filter the properties returned. It worked well until recently and still does on the gremlin console.

jbmusso commented 8 years ago

Interesting - can you confirm that you're not receiving any message at all? cc @spmallette

(I should add a debug flag/option which logs the raw response messages to the console.)

adurrive commented 8 years ago

I double-checked with the debug logs in the Gremlin server and something is definitely strange.

It returns the correct response result with a SUCCESS code, but unlike with other scripts it does not subsequently call WebSocket08FrameEncoder and write the encoded message. No message is received in the javascript client.

However if I send the exact same script through the Gremlin console, the Gremlin server subsequently calls WebSocket08FrameEncoder and writes the encoded message.

dmill-bz commented 8 years ago

As I mentioned on chat earlier. I tried running this command against 3.1.0 with a different client and it worked. Here's a link to the conf file used in case it has any hints towards a potential issue: https://github.com/PommeVerte/gremlin-php/blob/master/build/server/gremlin-server-php.yaml

The most noticeable difference is :

- { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0 }
- { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0 } 

instead of JsonMessageSerializer .

It might be a serializing issue or it might be completely irrelevant.

jbmusso commented 8 years ago

@adurrive Which version of TinkerPop do you use?

Using a freshly built TinkerPop v3.0.2, I couldn't reproduce your issue via the Gremlin console or via gremlin-javascript v1.0.2. I get proper response messages and query result in both case.

Note: I started Gremlin server started using this .yaml file: https://github.com/jbmusso/gremlin-javascript/blob/fd33c30c8d567ab40daa65da4725345c42b1761e/conf/gremlin-server-js.yaml

adurrive commented 8 years ago

I've tried a bunch of different configurations and the lowest common denominator seems to be Titan. Regardless of the TinkerPop version (3.0.1 or the latest 3.1.0 build), the Titan version (1.0.0 or the latest 1.0.1 build) or the client used (gremlin-javascript or aiogremlin but not the gremlin console). TinkerPop using TinkerGraph works as expected.

The easiest way to reproduce the issue is an out of the box Titan 1.0.0 launching Gremlin server with the default Berkeleyje server.

I guess it is more of a Titan issue then. Thanks for looking into it! I will open an issue there.