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

quic: start adding in the internal quic js api #53256

Closed
wants to merge 2 commits into from

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Jun 2, 2024

While the external API for QUIC is expected to be the WebTransport API primarily, this provides the
internal API for QUIC that aligns with the native C++ QUIC components. This is the first of several PRs that will fill out this part of the implementation. The goal of doing this incrementally is to make things easier to review by doing it in smaller chunks

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Jun 2, 2024
@jasnell jasnell added the quic Issues and PRs related to the QUIC implementation / HTTP/3. label Jun 2, 2024
@jasnell jasnell requested review from Qard and anonrig June 2, 2024 03:35
@jasnell jasnell force-pushed the quic-part-13 branch 2 times, most recently from 1babee6 to 9f2f600 Compare June 2, 2024 04:03
@jasnell jasnell requested a review from mcollina June 2, 2024 04:04
@jasnell jasnell requested a review from tniessen June 2, 2024 14:30
lib/internal/quic/quic.js Outdated Show resolved Hide resolved
@targos targos added dont-land-on-v18.x PRs that should not land on the v18.x-staging branch and should not be released in v18.x. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. labels Jun 2, 2024
@jasnell jasnell force-pushed the quic-part-13 branch 8 times, most recently from d4ea9c3 to f245d2c Compare June 2, 2024 22:14
lib/internal/quic/quic.js Outdated Show resolved Hide resolved
lib/internal/quic/quic.js Show resolved Hide resolved
lib/internal/quic/quic.js Outdated Show resolved Hide resolved
lib/internal/quic/quic.js Outdated Show resolved Hide resolved
lib/internal/quic/quic.js Outdated Show resolved Hide resolved
lib/internal/quic/quic.js Outdated Show resolved Hide resolved
lib/internal/quic/quic.js Outdated Show resolved Hide resolved
lib/internal/quic/quic.js Outdated Show resolved Hide resolved
lib/internal/quic/quic.js Outdated Show resolved Hide resolved
lib/internal/quic/quic.js Outdated Show resolved Hide resolved
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless a massive improvement is planned on WebStream, I would recommend not using them in this lower level. They are 1 order of magnitude slower than Node streams. Using them here would limit the applicability of our Quic implementation.

Just using functions and callbacks might even be faster.

@splitice
Copy link

splitice commented Jun 7, 2024

Really interesting @jasnell .

Just a reminder we have continued to apply fixes to your original attempt many of which probably still apply today (latest branch: https://github.com/HalleyAssist/node/commits/test_quic16/ - not everything in this branch is relevant). Some fixes could probably done better with more drastic changes, however they all represent observed leaks, infinite loops or crashes observed in our staging and pilot environments.

Including yesterday a fix for blocking streams creating an infinite loop in SendPendingData (which can be tested for with rx packet loss simulation). When you do get a JS api I'll try and contribute some of these directly.

Comment on lines 1288 to 1333
instance[kStats] = createStreamStats(handle.stats);
instance[kState] = createStreamState(handle.state);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes me a bit nervous that these names are a single character apart. High chance of typos in future maintenance.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not ignoring this comment, just plan to address it in a subsequent iteration

@jasnell jasnell force-pushed the quic-part-13 branch 3 times, most recently from 9dc124d to 952b293 Compare July 8, 2024 03:41
lib/internal/quic/quic.js Outdated Show resolved Hide resolved
lib/internal/quic/quic.js Show resolved Hide resolved
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

While the external API for QUIC is expected to be
the WebTransport API primarily, this provides the
internal API for QUIC that aligns with the native
C++ QUIC components.
@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Sep 28, 2024

jasnell added a commit that referenced this pull request Sep 29, 2024
While the external API for QUIC is expected to be
the WebTransport API primarily, this provides the
internal API for QUIC that aligns with the native
C++ QUIC components.

PR-URL: #53256
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
jasnell added a commit that referenced this pull request Sep 29, 2024
PR-URL: #53256
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
@jasnell
Copy link
Member Author

jasnell commented Sep 29, 2024

Landed in 103b843...858bce5

@jasnell jasnell closed this Sep 29, 2024
@targos
Copy link
Member

targos commented Sep 30, 2024

This landed with failing Coverage CI, and now it fails for all PRs against main

@@ -4,7 +4,7 @@
"test/**",
"tools/**",
"benchmark/**",
"deps/**"
"deps/**",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is why coverage jobs error

targos pushed a commit that referenced this pull request Oct 5, 2024
While the external API for QUIC is expected to be
the WebTransport API primarily, this provides the
internal API for QUIC that aligns with the native
C++ QUIC components.

PR-URL: #53256
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
targos pushed a commit that referenced this pull request Oct 5, 2024
PR-URL: #53256
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
@aduh95 aduh95 mentioned this pull request Oct 9, 2024
louwers pushed a commit to louwers/node that referenced this pull request Nov 2, 2024
While the external API for QUIC is expected to be
the WebTransport API primarily, this provides the
internal API for QUIC that aligns with the native
C++ QUIC components.

PR-URL: nodejs#53256
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
louwers pushed a commit to louwers/node that referenced this pull request Nov 2, 2024
PR-URL: nodejs#53256
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. dont-land-on-v18.x PRs that should not land on the v18.x-staging branch and should not be released in v18.x. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. quic Issues and PRs related to the QUIC implementation / HTTP/3.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants