bpmux
bpmux copied to clipboard
Run over WebTransport
https://web.dev/webtransport/
This should be a very thin layer, with WebTransport doing the muxing and backpressure and bpmux just adapting Web streams to Node streams.
Should check first that WebTransport streams (or at least their implementation) don't suffer from starvation by using https://github.com/davedoesdev/bpmux#comparison
Can start by testing HTTP/2 streams and HTTP/3 streams when ready, Node-to-Node - and browser to Node using http2-duplex. If they maintain their own backpressure, we can add support to bpmux so it essentially becomes a no-op in those cases (just API compatibility).
Tested: http2 doesn't suffer from starvation (has windows for connection and invidual streams).
WebTransport waiting for https://github.com/nodejs/node/issues/38478 and https://github.com/nodejs/node/pull/38233
Support for pair of HTTP/2 sessions added in 8.2.0
While WebTransport/HTTP3/quic is being added to Node, try https://github.com/fails-components/webtransport