Search code examples
javagremlintinkerpop3

Does gremlin provide/support client side HttpChannelizer implementation using java driver?


The websocket channelizer seems to be the default and only implementation available using the java driver https://tinkerpop.apache.org/javadocs/current/core/org/apache/tinkerpop/gremlin/driver/Channelizer.WebSocketChannelizer.html

Is there an equivalent HTTP Channelizer which can be used from the client? I can see https://tinkerpop.apache.org/javadocs/current/full/org/apache/tinkerpop/gremlin/server/channel/HttpChannelizer.html which seems to be for use in the server as per the comments in the file.

Context: load balancing with websockets don't work as expected due to persistent connections, e.g. adding a new server does not help with redistributing the load, as the connections to the existing servers are persistent. Any other alternatives to this issue other than moving to HTTP?


Solution

  • There is no official support yet to run the drivers over HTTP. There is however future experimental support for HTTP that comes with a number of limitations like not being able to support sessions or transactions. This experimental support will first be available for Java and Python and is not yet in any release. You'd have to build it yourself from the master branch of the GitHub repo until 3.7.1 releases. Note that even when 3.7.1 releases it will remain an experimental feature and likely stay so until the limitations can be addressed and more testing can be done. Further note that the driver would also have to work with a 3.7.1 compatible server as it took more than just driver changes to get this feature to work.