Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Ruby Gremlin Client

Build Status Gem Version Coverage Status

=================================== WARNING ===================================
|| If you are using version 0.1.2 or prior please update! Your results won't ||
|| be consistent while you don't do so!                                      ||
=================================== WARNING ===================================

Details on the above at #3

Gremlin client in ruby for the WebSocketChannelizer.

This client is not thread safe by itself! If you want to make it safer for your app, please make sure to use something like ConnectionPool gem.

Usage:

gem instal gremlin_client
conn = GremlinClient::Connection.new(host: 'localhost', port:123)
resp = conn.send_query("g.V().has('myVar', myValue)", {myValue: 'this_is_processed_by_gremlin_server'})

Alternativelly, you can use groovy files instead:

resp = conn.file_send("query.groovy", {var1: 12})
g.V().has("something", var1)

You can even specify the folder where to load those files in the constructor:

conn = GremlinClient::Connection.new(gremlin_script_path:  'scripts/gremlin')

TODO:

The following things are priority in our list of things to do, but we haven't had time to implement yet:

  • rspec
  • SSL support
  • authentication

The following is very nice to have, but since we are testing against Titan 1.0.0, which has a pretty old version of Gremlin, we still rely on groovy to do more complex parsing. But as soon as JanusGraph is release it would be nice to start working on:

  • ruby-side syntax like g.V.hasLabel("omg")..
  • compiled Gremlin query generation

About

Gremlin client for the WebSocketChannelizer

Resources

License

Packages

No packages published

Languages

You can’t perform that action at this time.