jsr340-experts@servlet-spec.java.net

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

From: Greg Wilkins <gregw_at_intalio.com>
Date: Tue, 17 Jun 2014 20:28:28 +0200

Jetty is has now implemented http2 and we are about to start experimenting
with push APIs. If anybody has some thoughts on what this should look
like, we are keen to try ideas out.

cheers


On 3 June 2014 15:44, Greg Wilkins <gregw_at_intalio.com> wrote:

>
>
>> The current plan of record does call for standardizing HTTP 2.0 server
>> push in Servlet 4.0. That work may reveal more facts to sway the
>> decision.
>>
>>
> This is a good thing to include. With the jetty implementation of SPDY,
> we do push below the level of the Servlet Container, but this mostly limits
> us to pushing static content, which is often handed off to CDNs anyway. It
> would be good to be able to push both static and dynamic content.
>
> The rough idea that I have had (without too much deep though), is that
> push could be added to the RequestDispatcher mechanism. The way push
> works in HTTP/2 is that a response to a request may include notification
> via push promises of simulated request to which the server will soon send
> the response to. To model this in the server we could just add a push
> method to the request dispatcher, so that
>
> request.getRequestDispatcher("/some/resource").push(request,priority);
>
> would send on the current response a push promise for "/some/resource"
> with it's simulated request based on the passed request object (ie same
> cookies, UA etc.).
>
> Note that this method would not actually do the pushing, but would
> schedule a new dispatch to the servlet container when the priority criteria
> is met (some streams need to be pushed before others, so let's not dispatch
> too many threads all at once).
>
> Anyway, that's just a rough idea of my current thoughts. I'll have more
> to say on this as we get to the point in our http2 implementation for jetty.
>
>



-- 
Greg Wilkins <gregw_at_intalio.com>
http://eclipse.org/jetty HTTP, SPDY, Websocket server and client that scales
http://www.webtide.com  advice and support for jetty and cometd.