H2 push needs to be linked to an initial response, and I don't think it's acceptable to push resources once the initial response is complete. Also, H2 push is pretty much a request/response pair, so it can be cached, so it doesn't really fit the SSE model.
You're right about websockets though. At some point they'll be replaced with something more H2-like, but it won't be push-based.
We have worked with SSE, HTTP/2 and HTTP/2 Push of SSE event streams and it is a combination made in heaven. In particular, we use SSE events to have the server announce to the browser when a particular segment of an interlaced or progressive image has been delivered. With this combo, the SSE events can be delivered on the wire very close to the data frames for the image pieces themselves.
That's... brilliant, actually! It's like making a request in Go, and being returned a response promise, along with an "events that occurred during response processing" channel, which you can select() on until the promise is resolved.
Also, you would still need something else for HTTP/1.x. Even an HTTP/2 client does not have to support server push, and can even ask the server to disable it.
Why do you think server-sent events are not HTTP-y? I found them as elegant as modern Web technology gets.
[1] https://daniel.haxx.se/blog/2016/06/15/no-websockets-over-ht...
> Sticking to HTTP/2 pretty much allows you to go back and use the long-polling tricks of the past before websockets was created.
Interesting how things turned out. The old bad way is now a good way. Last time I've checked Google Hangouts also used polling instead of WebSockets.
These days people use Server Sent Events and WebSockets for this: The client requests data from the server (possibly through a "subscription" type of request), and the server keeps sending messages (e.g. chat messages) until the client cancels the request or closes the connection.
Not having looked deeply into Server Push, it sounds ideal for this sort of thing, and then we could do away with both SSE and WebSockets, neither of which are very HTTP-y.