-
Notifications
You must be signed in to change notification settings - Fork 79
Why is http2 exposed as a property of the http module? #29
Comments
There is an existing |
Could ask nicely if the author of |
Definite possibility. I'd rather avoid hyphenated names as much as possible. Requesting the |
I expect a significant number of people mistyping that as |
@jmandzik ... how would you feel about the possibility of transitioning ownership of the |
@nwgh If http2 gets added to core, would you mind giving up the namespace so the core solution can be be implemented elegantly? |
@jasnell I'm happy to relinquish it, especially for node core! I'm traveling this weekend with limited access to computer, but I'll circle back with you Monday if that works. |
Definitely works. Thank you!
…On Fri, Dec 16, 2016 at 2:56 PM Justin Mandzik ***@***.***> wrote:
@jasnell <https://github.com/jasnell> I'm happy to relinquish it,
especially for node core! I'm traveling this weekend with limited access to
computer, but I'll circle back with you Monday if that works.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#29 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAa2eeiHGnqZW6g0nCpQaN10s46zIBuhks5rIxcMgaJpZM4LO67p>
.
|
As much as I think h2 is better than a property tacked onto http, I think h2 might confuse users as it's not clear what h2 means. The core API should demonstrate good API design. I don't think h2 for http2 exactly fits in this regard as it's inconsistent with the http and https module. Would love to hear what @nwgh thinks here. |
Hi all. Sorry for the lag, must be that time of year :) Anyway, I'm more than happy to give up the "http2" namespace for core. I definitely think that makes the most sense in all respects. I don't have great access to rename the package on npm right now, but later this week I'll rename to something (once I come up with a reasonable name) as I personally (in my role as a Firefox developer) will continue to depend on what we currently know as "http2", as we use that for integration testing of our http/2 stack. I also agree with @RobertWHurst that "h2" is a little un-descriptive. While it matches the ALPN token (and is what I normally use with other networking types), it's too easily confused with the h2 HTML tag. Best to be more explicit, in my opinion. I'll circle back around once I've done the rename to let everyone know the namespace is free. |
@nwgh I don't know what is the process for all of this. We should probably get NPM and the TSC/CTC involved. I would like to keep the ecosystem disruption as small as possible. |
You shouldn't really need us for this. https://www.npmjs.com/policies/disputes is our name dispute policy, and it has instructions on transferring names (tl;dr Personally, I'd just add a note in the README that If you want more guidance than this or something actually official (I am not saying this stuff in any official capacity. I'm simply mentioning what options you have), then please email support@npmjs.com so we can handle this with existing processes. I don't see any issues, tho :) |
What @zkat said also happens to be the official position of npm, Inc. on this matter. If node-core adds a new builtin that takes over a name currently used in npm, well, that sucks. We've been there before. Please be very careful about that. If you want the existing owner to move off the name, follow this: https://www.npmjs.com/policies/disputes If you want technical guidance about how to make that go smoothly, I'm happy to help out. |
@zkat ... Thank you very much for the clarification. That's what I had suspected but wasn't sure if the unpublish policy changes had altered the process on this at all. |
I figured it would be good for other folks here if I spelled out the technical constraints here. How Do Native Module Conflicts Work?
Possible StepsThis is an idea of one way you could do it. Feel free to mix and match and reword depending on what you feel is best:
ResultsThis is what various kinds of users will see, depending on their current setups:
AlternativesYou could simplify all of the above by just publishing a Alternatively, you could literally deprecate the entire The simplest path is to just... not do anything. Make sure there's no way to get malicious |
I know I'm not involved in the heavy lifting going on here, but I want to say; @nwgh and @jmandzik, It's very cool of you guys to offer up your namespaces. I could imagine building a popular package then passing it off to the core team can feel a bit difficult. Super cool to see you guys so willing to do so in order to make node better. Love seeing this kind of kindness 🍻 |
I do not want to remove enthusiasm from everyone, but http2 in core is not ready to ship, and the current plan is to land it in node 8 behind an experimental flag, or with a "experimental" stability indicator: http2 support will break while we go, and there will be bugs. We have plenty of time to come up with the best plan that minimize disruption, and to support a long transition time. As an example, we could rename http2 on npm before node v8, and ship http2 in core behind a flag. In node v9, we could drop the flag. |
Would it be possible to have the |
@not-an-aardvark Why? We already have agreement from @nwgh, the package owner of http2 for using it's package name once this feature eventually drops. |
Given that the existing |
Just my two cents here, but I believe it's better to be consistent with the rest of the core modules. As for rolling the major. It can't be done as core modules are not versioned in the user's package.json. As for code breakage, I would argue that when a user upgrades their node version a whole major, they are opting into breaking changes and will need to fix old code. This is the same as any major release of node where there are breaking changes. Adding HTTP2 should be a whole release major in itself. |
The user might not be depending on I'm not saying that we can't use the |
@not-an-aardvark I agree, minimizing breakage is very important. I would just add that so is consistency. Without it you end up with an ugly system. The course of action I think would be best here is that the Based on my suggestion above I think the things we would need to know here are:
|
For what it's worth, I think |
I'm probably gonna sound like a complete tool (since I haven't really followed the API design work being done here), but can't http2 simply be married with the already existing built-in http and https? I'm sure that would be a challenge, but would it be impossible? Both |
The http/2 protocol is fundamentally different from http/1 is so many ways that somehow merging the two would be entirely impractical and, in many cases, impossible. |
This really is a bikeshed. Here's what I'd recommend (because of course what this is lacking is Yet Another opinion, ha ha)
|
@isaacs I see what you're saying here. I'm just unclear why you suggest going the warty road here. Unlike the browser environment node has proper versioning. The trade off here in my opinion is that node ends up looking rather confusing to newcomers. It doesn't seem unreasonable to ask that a node user update their code when they decide to bump the Node version a major release. |
@RobertWHurst It's easy to underestimate the cost of breaking changes in Node.js, because as you say, upgrades are opt-in, so what's a few more changes? But these changes add up, and they result in creating the impression that Node.js is unstable, unreliable, and chasing newness for its own sake rather than investing in quality and the needs of users. You can argue it's unfair, but the fairness doesn't change the perception. We want people to upgrade. We should make it as easy as possible to do so, even if that means a slightly more cluttered API surface. And really, |
Why should it be |
At this point, we do not need to nail down what the exact namespace / entry point will be. We will have a reasonable entry point and we will take ecosystem impact into consideration in the process. I really appreciate the current owners of the |
So after all, how it will be called? Any docs available? Is it available in nightly build? Any info related to http2 should be added to the main page. It's kinda missing or i wasn't reading carefully... |
Still a work in progress but the current implementation is available
through require('http2') in this repo.
…On Fri, Feb 3, 2017 at 4:15 AM Beck ***@***.***> wrote:
So after all, how it will be called? Any docs available? Is it available
in nightly build? Any info related to http2 should be added to the main
page. It's kinda missing or i wasn't reading carefully...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#29 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAa2eUtOf6b3rUTGWSDWvzeY3AylwZyjks5rYxp5gaJpZM4LO67p>
.
|
Closing this as we're going to be going with |
Hi everyone. I'm just curious why http2 is exposed via
require('http').HTTP2
? Is this temporary, or the final API? It seems a bit clunky. I was hoping we'd seerequire('http2')
.As an aside, this is really cool stuff. Really exciting to see this under development. Thanks for your efforts here. 🍻
The text was updated successfully, but these errors were encountered: