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

Node.js support for WebTransport #511

Open
wilaw opened this issue May 11, 2023 · 14 comments
Open

Node.js support for WebTransport #511

wilaw opened this issue May 11, 2023 · 14 comments

Comments

@wilaw
Copy link
Contributor

wilaw commented May 11, 2023

Having support for WebTransport within Node.js would accelerate development of prototypes within the W3C WebTransport community. What can be done to initiate or support this functionality?

May be predicated on HTTP/3 support within node nodejs/node#38478.

Any other blockers?

@wilaw wilaw added the Discuss at next meeting Flags an issue to be discussed at the next WG working label May 11, 2023
@vasilvv
Copy link
Contributor

vasilvv commented May 11, 2023

There is at least one implementation I am aware of, though I am not sure how their API compares to the W3C one.

@aboba
Copy link
Collaborator

aboba commented May 15, 2023

The FAILS implementation isn't production ready and hasn't been kept up to date.

@martenrichter
Copy link

martenrichter commented May 15, 2023

The FAILS implementation isn't production ready and hasn't been kept up to date.

I don't know if it is production ready.
But I synced the master branch every Saturday to current quiche changes and I also backport changes, so the master branch is at least as up-to-date as quiche is. However, I did not implement yet BYOB. Or do you mean recent changes in the spec?
But I have not released it for a while, are the changes in quiche since the last release sufficient for a new version?

Anyway, the API follows closely the W3C draft. With some additions for the server.

Besides, there is a PR for a test from a contributor, which is a bit stuck. The main problems, why the test is not progressing, are a lot of race conditions in the tests itself, which depends on the machine (but is not triggered on my machine), and a problem in chromium.

@jasnell
Copy link

jasnell commented May 15, 2023

I'm hoping to get QUIC support landed fully in Node.js by the end of the year, which will hopefully also include WebTransport API support. However, that's still not set in stone.

@wilaw wilaw removed the Discuss at next meeting Flags an issue to be discussed at the next WG working label May 24, 2023
@wilaw
Copy link
Contributor Author

wilaw commented May 24, 2023

@jasnell and @martenrichter - thanks for your feedback. We notified the WG of your work and are monitoring progress with anticipation. If there are any API changes you feel you need for node.js integration, please be sure to notify us via issue.

@martenrichter
Copy link

@wilaw
Will do. Does this apply only client side? (I use an api server side, which close/identical to client side).
So far for all implemented features, most were implemented without changes. But there are some extensions partly requested by users, can collect them and create issues.

@wilaw
Copy link
Contributor Author

wilaw commented Dec 18, 2023

I'm hoping to get QUIC support landed fully in Node.js by the end of the year, which will hopefully also include WebTransport API support.

@jasnell - any holiday update on the progress of this initiative?

@endel
Copy link

endel commented Jan 4, 2024

I've just released a "playground" prototype using @martenrichter's @fails-components/webtransport: https://github.com/endel/webtransport-nodejs - it works locally on Chrome by opening https://localhost:4433 -> selecting "Advanced" -> "Proceed to localhost (unsafe)"


EDIT: Live version is available at https://web-transport.dev

@martenrichter
Copy link

May be I should update on the status of the node.js package (many changes in the last weeks):

  • Uses now the node.js eventloop (custom Reader/Writer as suggested by Victor Vasilev a while ago)
  • Different transports are now supported (including the initial libquiche http/3, a node.js based http/2 (though settings require an node.js update, PRs are in the pipeline), and WebTransport over WebSocket support
  • Also acts as a polyfill for the browser using the same code basis (WebTransport over WebSocket only).
  • http/3 transport is now provided as a separate package.

Due to the new structure, it might be possible, if some QUIC/http/3 is available on node.js to built a separate transport.

@jasnell
Copy link

jasnell commented Jan 4, 2024

QUIC in Node.js is still in progress but moving forward. No ETA on completion as my availability to work on it is quite limited but it is making progress

@wilaw wilaw added this to the Future version milestone Feb 7, 2024
@fawazahmed0
Copy link

libp2p seems to have a js package for webtransport

@martenrichter
Copy link

libp2p seems to have a js package for webtransport

Which is for the browser side and built around the usual WebTransport interface the browser exposes: see:
https://github.com/libp2p/js-libp2p/blob/a3692509feceb546b1ef2f7b5fe3138cfa43e930/packages/transport-webtransport/src/index.ts#L114

@wilaw
Copy link
Contributor Author

wilaw commented Oct 22, 2024

QUIC in Node.js is still in progress but moving forward. No ETA on completion as my availability to work on it is quite limited but it is making progress

@jasnell @martenrichter - as we reach the end of the year, any update on WebTransport in node?

@LPardue - can you lobby to free up some time for James to focus on this integration?

@martenrichter
Copy link

There is still my intermediate (or experimental duct-tape) node.js package (libquiche-based for http/3 but using native node.js sockets, but also includes a node.js http/2 support (need a newer node.js version for initial settings, and I am afraid I do not know any UA implementation of http/2) and my webtransport/websocket flavor for poly filling).
I did not catch up on Webtransports' newer features introduced this year in the web transport spec, such as send groups, but I may look into them during the winter break. During the last months, I focused more on testing the package's test codes against browsers, which revealed browser bugs and led to some fixes. (And it is just a side project, serving the video part of another project.)

But I am also curious about native node.js support, as I wrote the package only to bridge the time until native node.js support arrives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants