Github user rschmitt commented on the issue:

    https://github.com/apache/httpcomponents-core/pull/91
  
    > True, but I suppose not every data stream may need buffering. This change 
would make it mandatory if I understand it correctly.
    
    A buffering *layer* will be mandatory (it has to go somewhere in any HTTP/2 
implementation), but data only has to be buffered if the downstream consumer is 
not ready to process it; otherwise it can be passed directly downstream. Either 
way, these details can be encapsulated by the client. (We can further reduce 
buffering by only buffering the *initial* window, and letting the downstream 
consumer drive capacity updates directly after it has been consumed.)
    
    > Let's leave `AsyncDataConsumer` be for now but get rid of return type in 
AsyncDataConsumer#consume as the first step.
    
    I was actually thinking the same thing; this change by itself is a 
significant simplification without having to tackle the more difficult 
"lifecycle" changes (where `updateCapacity` is redesigned along the lines of 
`onSubscribe`). a5739b5dba9b10b357726602ede56406be2c8b69 looks good to me; I 
say ship it!


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to