davedoesdev / bpmux

Node stream multiplexing with back-pressure on each stream
MIT License
18 stars 2 forks source link

Run over WebTransport #12

Open davedoesdev opened 2 years ago

davedoesdev commented 2 years ago

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.

davedoesdev commented 2 years ago

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).

davedoesdev commented 2 years ago

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

davedoesdev commented 2 years ago

Support for pair of HTTP/2 sessions added in 8.2.0

davedoesdev commented 1 year ago

While WebTransport/HTTP3/quic is being added to Node, try https://github.com/fails-components/webtransport