4 ms·
Both protocols implement their own framing scheme(s). Once you start looking at the details of such a suggestion, it becomes kind-of a hack to use websockets f
by pcj-github 8y ago
Both protocols implement their own framing scheme(s). Once you start looking at the details of such a suggestion, it becomes kind-of a hack to use websockets for streaming gRPC and likely to have scaling issues. One can do it as a proof-of-concept and may work fine in low-traffic scenarios. I think it will not be a reality until browsers expose some sort of fetch-like http2 primitive to developers.
- anderspitman 8y agoI guess a more implicit part of my question is why didn't they design it to work well on top of websockets from the beginning, rather than doing their own framing? If you assume you have a reliable in-order messaging protocol to build on top of, then you can swap that protocol out for different cases (ie websockets/WebRTC on the web, reliable UDP/SCTP/etc for other cases). I say this with very little background in gRPC. I'm working on a protocol that aims to do exactly this[0] (but for streaming only, not RPC), and I'd like to learn as much as possible from smarter people who have done similar projects. [0] https://github.com/anderspitman/omnistreams-spec https://github.com/anderspitman/omnistreams-spec