Git Product home page Git Product logo

Comments (7)

ekinnear avatar ekinnear commented on May 13, 2024 38

I propose we label this position: support 7 days from now, with the following:

We are in support of an API that allows the web to take advantage of the modern networking capabilities brought by new protocols such as QUIC and HTTP/3. Providing unidirectional and bidirectional streams, as well as potentially-unreliable datagrams, with no head of line blocking and minimal latency overhead is an important and useful addition to the web. The WebTransport architecture and API definition appear to be mature enough for experimentation. We are also interested to see additional progress in ensuring that WebTransport provides an enduring abstraction across multiple protocols to avoid proliferation of transport-specific APIs.

from standards-positions.

aboba avatar aboba commented on May 13, 2024 13

For performance reasons, the WebTransport API intentionally did not use the message approach of WebSockets and RTCDataChannel. A problem was found in the WebSocket and RTCDataChannel specification which manifests in low-end devices such as mobile devices or game consoles. When the application's onmesssage handler cannot keep up with the volume of incoming messages, the TCP or SCTP receive window does not close to exert backpressure on the sender. This is because TCP/SCTP only track whether a segment has been transferred from the receive queue, not whether the message has been consumed by the browser application. This problem does not occur in WebTransport API, because the WHATWG streams supports back pressure and the WHATWG streams send and receive queues are kept small. Therefore if the application cannot keep up with incoming data, the QUIC receive window will contract, exerting back pressure on the sender.

from standards-positions.

othermaciej avatar othermaciej commented on May 13, 2024 8

I wonder if this could be built as an extension of the WebSocket API instead? It seems like an anti-pattern for each distinct network protocol to have a disjoint web-exposed API, even when the purpose is broadly similar. (I suppose one advantage of this way is that it's easy to feature-test client-side for support for the Web Transport protocol).

from standards-positions.

youennf avatar youennf commented on May 13, 2024 7

I wonder if this could be built as an extension of the WebSocket API instead?

Some parts could have been done this way but the WebSocket API is rather old.
Starting from scratch allows to build a more modern API (similar to XHR -> fetch). See for instance the integration with streams. The efforts to modernise WebSocket/RTCDataChannel have also stalled AFAIK.

Some functionalities are beyond WebSocket also (datagrams) so it would have been difficult to reuse WebSocket API.

It seems like an anti-pattern for each distinct network protocol to have a disjoint web-exposed API

We gave that feedback (initially the API was prefixed by QUIC for instance) and this was taken into account.
WebTransport is now defined as an abstraction on top of which different protocols can be used (H2 or H3 for instance...).

I think it’s pretty unfortunate that WebSocket, WebTransport, and some communication parts of WebRTC all seem to have overlapping goals and designs, and yet seem to have been developed completely in isolation from each other.

That is not entirely true. RTCDataChannel for instance is duck typing the WebSocket API for instance.
WebTransport is also being standardised with the help of WebRTC WG members.

WebRTC is a high level API that provides limited control on what happens on the network, but the defaults are pretty good and it works consistently.
WebTransport on the reverse is much lower level and leave most of the actual work to web pages.

from standards-positions.

litherum avatar litherum commented on May 13, 2024 2

I think it’s pretty unfortunate that WebSocket, WebTransport, and some communication parts of WebRTC all seem to have overlapping goals and designs, and yet seem to have been developed completely in isolation from each other.

from standards-positions.

sendtopms avatar sendtopms commented on May 13, 2024 2

Firefox 114 now supports WebTransport without flag.

from standards-positions.

hober avatar hober commented on May 13, 2024

cc @youennf

from standards-positions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.