text stringlengths 0 1.32k |
|---|
**Adam Stacoviak:** \[16:07\] Incrementally. |
**Thomas Watson:** Yeah, it's an incremental... |
**Adam Stacoviak:** Versus a big swathe, which will break things. |
**Thomas Watson:** Yeah, I don't wanna kill the world. I myself use the URL library quite extensively, and actually I like a number of its current real sloppy behaviors - they're excellent for some of my command line parsing. I happen to really enjoy its laissez-faire attitude towards URLs, but I also don't use them in... |
**Sam Roberts:** So your solution is that we could start with a, I don't know if they call it a 'soft deprecate' or what they call it, but basically you deprecate it in the documentation, saying "Actually, you shouldn't use this." Maybe even have kind of like blessed modules; you say, "Actually, go ahead and use this m... |
**Thomas Watson:** I would hope to get to that stage. I think if Node lives long enough and is successful long enough, that eventually a significant part of the ecosystem will shift over to a good version of URL, the one that's on npm. I would hope to see that shift happen. |
It could be that it never happens, and if it never happens, that's still okay because we still won't change or accept bug reports on the URL library... Unless it's a segfault... |
**Sam Roberts:** Security thing, right? |
**Thomas Watson:** Yeah, a security thing. Unless it's like a real problem. But when it just doesn't do what people expect, it's kind of like "Well, there is a module for that." |
**Adam Stacoviak:** So we've been talking about what to take out, and how best to take it out. How do you determine what to put in? |
**Sam Roberts:** You just say no. \[laughter\[ |
**Adam Stacoviak:** Just say no? That's the easiest way? What kind of criteria do you define as like what should be a module and what should be Core? |
**Thomas Watson:** I would say the things that should be in Node Core -- there's definitely a grey area, but I think there's a couple principles. One is that things that should be in Node Core are things that cannot be done effectively outside of Node Core. That's one thing. Things that have C++ bindings into V8, for e... |
But one thing that I would say is you have to ask yourself what needs to be in Node Core? For example, Node Core has an HTTP library that you could actually use pretty effectively, get lots of stuff done, it's good performance etc. But if you want HTTP redirect support, don't ask for it from Node Core, we're not gonna ... |
Another interesting example -- actually, I was just looking at the code to see what happened with this... But my understanding is that websockets are a real pain to install on Windows systems because they had a compiled add-on. So there was pressure to put websockets into Node Core, but that conversation ended really n... |
So we didn't have to pull in a whole websocket library to do that, we just needed to extend buffers, so it had this small API that could be used effectively to implement websockets. So websockets can stay out of Core and there can continue to be innovation in websocket APIs. Because all of the websocket APIs offer lots... |
\[19:55\] So I would say that for a number of features it would be nice if Node Core could add a very minimalistic set of APIs that will make it possible to implement higher level APIs, and people can use them directly and we'll keep them stable, but hopefully people would move out. |
Cluster is an example of that. Cluster could be built in the npm userland if there was two features present in Node Core that are currently missing. I would like to see those two features added... Obviously, somebody has to do it and I have not had the time to do it lately, but I'd like to see those two features added.... |
I think that's a good pattern. Look for the smallest thing that reasonably should be implemented in Node Core that's maybe usable; but if it's not quite usable and it has to be used by people writing modules on top of it on npmjs, that's great. The more people use those types of modules that have individually semvered ... |
**Sam Roberts:** One of the things I think that's holding back some modules to be exported out of Node Core and into userland is that a lot of them for performance reasons are written partly in C++, and still today building modules that have native dependencies takes a little bit of time, and can break, and is hard to ... |
**Thomas Watson:** It also requires network access the first time you do it to get the node-gyp headers. |
**Sam Roberts:** Yeah, so one thing that I really would look forward to would be - although that's not really Node, that's more npm or whatever package manager we're using - pre-built binaries. If we had pre-built binaries in the Node ecosystem, it would mean that we could have stuff like the HTTP/2 module that is curr... |
**Thomas Watson:** Yeah, I agree. That would be nice. It's a very difficult problem to solve. I've had many hours of unpleasant customer interactions dealing with problems with binary modules. In fact, our app metrics module, our node monitoring - we pre-build it for all supported platforms, all Node platforms, and we ... |
In theory, npmjs could organize a build farm and they could do it, but they'd also have to have all the libraries... You know, that's a separate problem; it's a big problem, and it's hard to solve. Bert had suggestions for that, actually. I don't know if you saw that Chrome has an intermediate compiled format; basicall... |
**Sam Roberts:** \[24:06\] Do you think that HTTP/2 should be shipped with Node? |
**Adam Stacoviak:** I was gonna ask that. |
**Thomas Watson:** Yeah... So that's an interesting case. I have mixed feelings. There's a case to be made that HTTP should not be part of Node as well. |
**Sam Roberts:** Absolutely. |
**Thomas Watson:** But there are significant performance problems. TLS is famously poor performance in Node. Anybody who's not absolutely required to do end-to-end encryption is terminating their HTTPS at NGINX or something reasonable. You can get two or three times speedups by doing that. And part of the reason it's s... |
Given that Node already has HTTP, I think HTTP/2 is going to become more and more popular and it's going to be stranger and stranger that we have HTTP/1 and not HTTP/2. The build requirements for HTTP/2 will be terrible. I'm pretty sure the implementation uses lots of calls into V8. It would probably be hard to wrap wi... |
**Sam Roberts:** But then you would have an API that you can't really change because now you're stuck with that; you have the same problem. |
**Thomas Watson:** Yeah. I think it's a heavy dependency on C++ that makes it something that might need to go into Node. I'm not really happy with it, but I can't think of a better way. |
An HTTP/2 is not just in C++ for performance, it's also because it's a complex protocol and it has a very good... I'm pretty sure the implementation is C, actually; well, at least the APIs are C. So it has a good implementation AND it's reasonably performant, and it's easy to build into Node... Or relatively easy; it w... |
There's been some work - there was for a while - to rewrite the DNS library away from C areas into pure JavaScript, because JavaScript compilation is getting better and better. But then Node is stuck with maintaining an entire protocol implementation in JavaScript all its own and nobody uses, which has its own maintena... |
I'm kind of on the fence there, but I can see the wind is blowing in the HTTP/2... |
**Adam Stacoviak:** We can clearly see there's a grey area, for sure. |
**Thomas Watson:** Yeah. |
**Adam Stacoviak:** There's no clear definition where you could say, "Well, this is what should go in and this is what should not go in" or "This is what should come out or not come out"... |
**Thomas Watson:** And there'll always be disagreement, yeah. |
**Adam Stacoviak:** Yeah, of course. |
**Thomas Watson:** Well, what do you think about HTTP/2? Are you on the fence as well, or are you like "No"? |
**Sam Roberts:** The main problem I see there is the compile -- if the compile issue wasn't there, I'd say it should definitely not go in. I also think that HTTP itself technically didn't need to be in, because no other module in Node Core is depending on the HTTP module. |
**Thomas Watson:** But it depends on the compile binary. The HTTP parser itself is a C++ add-on, so it would have required compilers. |
**Sam Roberts:** Exactly, that's the main issue. That's why I was thinking about maybe if we could have pre-compiled things for each platform, that might help it. But again... |
**Thomas Watson:** \[28:06\] It would make the tradeoffs really different. If in some future nirvana we achieve a better way of dealing with compiled add-ons, that really makes things better. The balance of tradeoffs would really change... Which is a good reason to have as few things as possible, so we don't look as fo... |
**Sam Roberts:** We just have to be really careful; every time we put something in we have to think to ourselves "Okay, it's now in for good. It's gonna be almost impossible to change this API from now on." We've seen that a lot of times in Node Core, and now we're stuck with that. Every time we add something, it has t... |
**Thomas Watson:** I think one of the interesting things about the HTTP API is that the protocol stack spec is pretty stable; HTTP/2 is kind of what it is, and the Node API, in the streams part of it, follows the spec fairly closely. It supports all kinds of great features - protocol renegotiation, and as good header p... |
**Sam Roberts:** Streams is a clear example of something that should never have been in Node. It's a huge mess right now. |
**Thomas Watson:** I absolutely agree. |
**Sam Roberts:** I would recommend anybody who's working with Streams to not use the Streams that ships with Node, but to use a module called Readable Streams, which might be a little bit funny-sounding name because there's also other things in Readable Streams, but... Readable Streams is actually also maintained by a ... |
That's a good example; that should never have gone into Node, and I think we can start doing that... Maybe also with the Cluster module - make a Cluster module in userland as well. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.