jsr340-experts@servlet-spec.java.net

[jsr340-experts] Re: HTTP/2 Push Was: Server-Sent Events in Java EE 8

From: <edward.burns_at_oracle.com>
Date: Fri, 20 Jun 2014 20:25:33 +0000 (UTC)

GW> Jetty is has now implemented http2

As it currently stands! In any case congratulations. I was hoping we
could have a clean slate with HTTP/2 and make it so it is 100%
non-blocking. Is that the approach you took in Jetty?

GW> and we are about to start experimenting with push APIs. If anybody
GW> has some thoughts on what this should look like, we are keen to try
GW> ideas out.

Did you expose the request/response multiplexing capabilities to users
of your API? What about stream priority?

GW> The rough idea that I have had (without too much deep though), is
GW> that push could be added to the RequestDispatcher mechanism. The
GW> way push works in HTTP/2 is that a response to a request may
include
GW> notification via push promises of simulated request to which the
GW> server will soon send the response to. To model this in the server
GW> we could just add a push method to the request dispatcher, so that

GW>
request.getRequestDispatcher("/some/resource").push(request,priority);

My ideas for this are still very sketchy, but I know I'd rather see
push
fall out of the design as a consequence of having an API that more
closely models the fact that HTTP/2 gives us the capability of multiple
simultaneous streams within one connection, each of which is composed
of
bi-directional messages.

In other words, having push just be an offshoot from RequestDispatcher
seems overly limiting. I wonder if something closer to
javax.websocket.Session is a better abstraction?

Ed