Some StackOverflow posts and this informative blog post (but possibly outdated) suggest that HTTP/2 as currently implemented in browsers doesn't yet support push streaming, and that WebSockets or SSE should still be used when this functionality is needed.
I'm curious how Google Firestore, which implements gRPC over HTTP achieves this. From what I can tell after opening a site that uses Firestore, none of the following are used:
- WebSockets - DevTools doesn't show any open Websockets. Also this.
- SSE - I couldn't find "eventsource" anywhere in DevTools sources or in relevant source code
- WebRTC - Not applicable. I also couldn't find anything in chrome://webrtc-internals
- HTTP/2Server Push (aka Push_Promise) - Irrelevant
Questions
- Is FireStore simply using something similar to long polling, where the client opens an HTTP/2 stream (or HTTP/3 when using Chrome) with the server, and that server just keeps that stream open to pushes messages whenever it needs to.
- Is this made possible by some recent advancements in HTTP/2 browser implementations or have server/client software library developers simply figured out a way to emulate server-> client push streaming using this long polling method.
- If the above is true, can we now (in 2021) say that HTTP/2 can on its own achieve the same functionality provided by WebSockets and/or SSE, and that WebSockets are on their way to obsolescence.