rlane/rbvmomi — Issue #9: Allow pipelining of method calls
Author: cdickmann
Created: 2011-11-06 11:04:35+00:00
State: open

I propose the following:
- Start using the net-http-pipeline gem
See:
+ http://redmine.ruby-lang.org/issues/5461
+ https://github.com/drbrain/net-http-pipeline/blob/master/lib/net/http/pipeline.rb
+ http://www.igvita.com/2011/10/04/optimizing-http-keep-alive-and-pipelining/
- Offer Connection#_call version that is split into two parts
- Connection#_callPipelined would build the request and add it to the pipeline. It would internally maintain a FIFO queue of in-flight requests. The caller would be returned with a dummy object that offers DummyResult#result which will block and return the result (when received)
- A call to DummyResult#result or a call to Connection#_call would both trigger processing of the responses queued up in the TCP connection
- Offer new methods on ManagedEntity called _Pipelined that take the same arguments as the normal methods but instead of calling Connection#_call they call Connection#_callPipelined and return the DummyResult object.