4 ms·
Using non-blocking IO is a very old trick. Even nginx does exactly this, and it's written in C. The ability to use non-blocking IO does not make a language uniq
by falcolas 9y ago
Using non-blocking IO is a very old trick. Even nginx does exactly this, and it's written in C. The ability to use non-blocking IO does not make a language unique in any real fashion.
- alayek 9y agoI have never claimed that it's unique. In fact, most ideas in tech is just old wine in a new bottle. However, I guess what made it appealing initially, was that it uses a syntax known to a lot of web developers. The callback pattern helped. Although these days, we have been moving away to generators or async-await.
- falcolas 9y ago> a syntax known to a lot of web developers This is the key. And it reflects poorly on them for that. Syntax is the easiest part of a language to learn. The nuances of behavior is the hard part - and those nuances change as you move from the browser to the server; what makes good browser code will not make good server code. In reality they shunned a ton of knowledge and community support to keep a particular (and particularly mediocre) syntax. Even today, years after Node has reached popularity and many lessons have been learned, developers with no experience outside the browser think they can write perfectly good server code, simply because they know the syntax. Never mind that all of the design patterns change. Never mind that the core libraries they use change. Never mind that they suddenly have to be cognizant of how much CPU time their code takes.
- flavio81 9y ago> Even today, years after Node has reached popularity and many lessons have been learned, developers with no experience outside the browser think they can write perfectly good server code, simply because they know the syntax (...) This is really true and it's sad, because it leads to more security problems on everyday software.
- tim333 9y agoBeyond the syntax, an event loop is conceptually simple in a way that other models often are not. (For example https://news.ycombinator.com/item?id=11555866 https://news.ycombinator.com/item?id=11555866 had a how to Python async and I found it a bit confusing compared to js).
- jdc0589 9y agoIt has nothing to do with the language, there were other serverside javascript frameworks before node; they didn't take off (e.g. Narwhal). Node's success has everything to do with the environment itself in combination with the language. The node runtime, the associated stdlib, and most open source/3rd party modules have been written for a non-blocking runtime from day #1. The same stuff can be achieved in plenty of other languages/stacks (e.g. Python + Twisted), but you have much more work to do validating that every single library you use plays nice with async io, sometimes you have more event loop housekeeping responsibilities, etc...
- gaius 9y agoNode's success has everything to do with the environment itself in combination with the language. Let's be honest: it is nothing to do with either of those and purely a matter of fashion. In a couple of years at most there will be a new new thing and everything will revert to version 0.1, keeping everyone busy but making no actual progress. Gotta soak up those CPU cycles the hardware people are giving us somehow right? Can't let the users get any of that speed for themselves!
- coldtea 9y ago>Let's be honest: it is nothing to do with either of those and purely a matter of fashion. Let's be honest: if you need "fashion" or "idiocy" etc to explain a trend in tech, you don't have an explanation. Your explanation wouldn't even explain why it was Node+JS that got to be "in fashion" and not something else from the 20000 options.
- gaius 9y agoYour explanation wouldn't even explain why it was Node+JS that got to be "in fashion" and not something else from the 20000 options That's the point. There is no explanation, other than the same reason that bellbottoms are in again this year. Or out, I don't actually know. We pretend like we're "engineers" or "scientists" but there's nothing objective about what we do...
- yxhuvud 9y agoEven nginx? Nginx is fairly new compared to all the really old C code.