RFR: 8087112: HTTP API and HTTP/1.1 implementation
Michael McMahon
michael.x.mcmahon at oracle.com
Mon Sep 28 08:45:08 UTC 2015
On 27/09/15 18:19, Simone Bordet wrote:
> Hi,
>
> On Fri, Aug 28, 2015 at 10:50 PM, Michael McMahon
> <michael.x.mcmahon at oracle.com> wrote:
>> Hi,
>>
>> I'm looking for reviewers for the http client implementation.
>> This is just the common API layer and the http/1.1 implementation.
>>
>> The webrev is at http://cr.openjdk.java.net/~michaelm/8087112/01/
> It appears that none of my concerns expressed in this message:
> http://mail.openjdk.java.net/pipermail/net-dev/2015-July/009048.html
> have been addressed.
> Am I looking at the right link ?
The API has already been approved and the first version to
be integrated won't have all suggestions incorporated.
But, it should be possible to address many of them in time
for JDK 9 anyway.
> In particular:
>
> A) lack of backpressure,
My current thoughts on this is to have credit based flow control
window (similar to the Flow API) indicating the number of bytes
that a HttpResponseBodyProcessor is willing to accept and this
maps directly on to the HTTP/2 flow control window and the socket
buffer when doing HTTP/1.
> B) missing "request complete" event
When you suggested this, I decided to split the API so that requests
and responses complete independently, but this was too drastic a change
and most use-cases are satisfied by completion of both request and response.
It's also possible to be notified of request completion through the
request processor. It should be straight forward to wrap any request
processor
in a processor which provides a CompletableFuture for completion of the
request.
> C) missing timeouts (CompletableFuture.get(time) is obviously not the
> right semantic)
CompletableFuture.get() is at least useful for notifying timeouts.
The question then is what to do next and what was missing was
cancellation, and that has been added. Does that not suffice?
- Michael
More information about the net-dev
mailing list