users@servlet-spec.java.net

[servlet-spec users] Re: HTTP 2.0 specific configuration parameters in the API?

From: Wenbo Zhu <wenboz_at_google.com>
Date: Mon, 22 Sep 2014 11:11:15 -0700

On Mon, Sep 22, 2014 at 9:10 AM, Edward Burns <edward.burns_at_oracle.com>
wrote:

> >>>>> On Thu, 11 Sep 2014 21:36:10 -0700, Wenbo Zhu <wenbozhu_at_gmail.com>
> said:
>
> WZ> Re: WINDOW_UPDATE, or flow-control in general for async APIs, we either
> WZ> follow the epoll pattern or we do need expose the buffer/window size
> to the
> WZ> application. The latter is often very error-prone (in my experience).
>
> Can you explain in more detail what you mean here?
>
IMO - there are two styles to support flow-control for any async API, on
either the client or server side.

The first style requires the client and server to handle effectively what
TCP does. There are many issues, e.g. the API is complicated, and worse,
per-stream flow control isn't necessarily what the application wants, and
it's very hard to identify an optimal window size, either at run-time or at
design time.

The 2nd style: for reads, it requires the application to signal to the
"I/O" layer whenever the application is ready for more data; and for
writes, it requires the I/O layer to signal to the application whenever the
I/O is ready for more data. Whether the flow-control done at the
stream-level (as transport protocols) or at the process level is
transparent to the API/application.

Lastly it is impossible to have transparent flow-control. E.g. the fact
that the WebSocket (client) API lacks flow-control can't be remedied at the
I/O or protocol level.


>
> WZ> Curious why there isn't a JSR for the client-side API.
>
> Great question. The Java SE team uses the Open JDK JEP process and
> plans to keep the scope of the work small. This work is covered under
> <http://openjdk.java.net/jeps/110> and the discussion happens on
> net-dev_at_openjdk.java.net. The JCP side of the process is happening
> under the umbrella JSR for Java SE 9, which I don't think has been filed
> yet.
>
Sure I'll follow up there then. It would be nice to see a client-side JSR
though for HTTP/2.



>
> Ed
>
> --
> | edward.burns_at_oracle.com | office: +1 407 458 0017
> | 4 work days til JavaOne 2014
> | 0 work days til start of JSF 2.3 and Servlet 4.0
>