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

WebSocketStream #970

Open
ricea opened this issue Jan 29, 2024 · 3 comments
Open

WebSocketStream #970

ricea opened this issue Jan 29, 2024 · 3 comments
Assignees

Comments

@ricea
Copy link

ricea commented Jan 29, 2024

Request for Mozilla Position on an Emerging Web Specification

Other information

WebSocketStream is a new API for the WebSocket protocol that enables backpressure by integrating with Streams. The benefits are better behaviour when one side cannot keep up with the data rate, and a more modern API.

@valenting
Copy link

@jesup @jan-ivar Considering your experience with the WebTransport API do you have any thoughts regarding this proposal?

@smaug----
Copy link
Collaborator

@ricea the explainer talks about WebTransport as if it isn't a thing yet, but doesn't that have already multiple implementations. Is it not possible to support WebTransport API on top of various different kinds of network protocols?

(I don't personally have too strong opinions on WebSocketStream. The proposed API does look quite nice and simple when comparing to WebTransport which definitely is very complex)

@jesup @jan-ivar

@ricea
Copy link
Author

ricea commented Feb 22, 2024

@ricea the explainer talks about WebTransport as if it isn't a thing yet, but doesn't that have already multiple implementations. Is it not possible to support WebTransport API on top of various different kinds of network protocols?

Yes, sorry, I missed that part when I was updating the explainer. I fixed it in ricea/websocketstream-explainer#22.

I think WebTransport over HTTP/2 will eventually be supported by browsers.

There is also a polyfill of the WebTransport API over WebSocket. Ironically, this would benefit from the backpressure support provided by WebSocketStream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs proposed position
Development

No branches or pull requests

5 participants