New websocket connection on each traversal
I am using gremlin for traversing the janusgraph data via my java spring application. I am initiating the graph as below snippet
However, I see on each API call which triggers traversals, a new websocket connection is created, connection pool is opened and eventually closed. This adds lot of latency to my API. My expectation is that websockets are long running connections and should not be recreated every time.
What am I missing here?
@Bean
public GraphTraversalSource g(Cluster cluster) {
return AnonymousTraversalSource.traversal().withRemote(DriverRemoteConnection.using(cluster)); // Or "conf/remote.yaml"
}However, I see on each API call which triggers traversals, a new websocket connection is created, connection pool is opened and eventually closed. This adds lot of latency to my API. My expectation is that websockets are long running connections and should not be recreated every time.
What am I missing here?