Github user jorgebay commented on the issue:

    https://github.com/apache/tinkerpop/pull/903
  
    > Why do you want to keep the connections in the pool when a read/write 
operation is executed on them? They can't be used at that time anyway and I 
think that the current design is a lot easier where a connection is taken from 
the pool for the request and returned simply by disposing its `ProxyConnection`.
    
    That's exactly why, because the connection **can** be used concurrently for 
requests.
    
    Imagine the user wants to submit 10 queries, the first of them will take 
the server 100ms to send the response and the other nine will take 5ms. If you 
allow the connection to send the 10 requests without waiting for the response, 
the latency for the nine requests will be ~5ms. With the current approach, its 
~105ms.
    
    > I think it should be possible to implement such a request pipelining 
without changing the connection pool completely.
    
    I disagree. There is no point in having a `ProxyConnection` and a pool that 
dequeues when a connection can be used concurrently.


---

Reply via email to