Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebTransport #18

Closed
endel opened this issue Jun 29, 2022 · 7 comments
Closed

WebTransport #18

endel opened this issue Jun 29, 2022 · 7 comments
Assignees
Labels
from: Google Proposed, edited, or co-edited by Google. from: Microsoft Proposed, edited, or co-edited by Microsoft. position: support topic: http Spec relates to the HTTP (Hypertext Transfer Protocol) family of protocols topic: networking topic: web apis Spec relates to web APIs (entry points for script) venue: W3C Web Transport WG

Comments

@endel
Copy link

endel commented Jun 29, 2022

Request for position on an emerging web specification

Information about the spec

Design reviews and vendor positions

Bugs tracking this feature

  • WebKit Bugzilla:
  • Radar:

Anything else we need to know

Chrome added their prototype support to it on version 97: https://chromestatus.com/feature/4854144902889472

@othermaciej
Copy link

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

@othermaciej othermaciej added topic: web apis Spec relates to web APIs (entry points for script) topic: http Spec relates to the HTTP (Hypertext Transfer Protocol) family of protocols venue: W3C Web Transport WG labels Jun 29, 2022
@litherum
Copy link

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.

@hober
Copy link
Member

hober commented Jul 2, 2022

cc @youennf

@youennf
Copy link

youennf commented Jul 4, 2022

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.

@aboba
Copy link

aboba commented Sep 20, 2022

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.

@ekinnear
Copy link
Collaborator

ekinnear commented Apr 4, 2023

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.

@hober hober added this to the 2023 Week 15 milestone Apr 4, 2023
@sendtopms

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from: Google Proposed, edited, or co-edited by Google. from: Microsoft Proposed, edited, or co-edited by Microsoft. position: support topic: http Spec relates to the HTTP (Hypertext Transfer Protocol) family of protocols topic: networking topic: web apis Spec relates to web APIs (entry points for script) venue: W3C Web Transport WG
Development

No branches or pull requests

8 participants