Live data from Hacker News

Node.js has jumped the shark

unlimitednovelty.com

21–30 of 144 posts

Re: Node.js has jumped the shark

#21

I don't see how discussions like this signify the decline of NodeJS. Quite the opposite. Lots of people are thinking about how to do this kind of computation the right way, within the context of NodeJS. Honestly this discussion has kind of highlighted how bad almost all other platforms are and how much room for improvement there is.

Actually what I have found it has highlighted is just how many of the Node advocates completely and utterly fail to understand their competition. I really, really wanted to think it was just a few isolated people, but the evidence suggests that the meme that Node is actually some sort of multiprocessing breakthrough has spread further in the last few months, rather than dying out.

So let me lay it out for you: Node's multithreading is primitive. There are in fact other languages that can simultaneously do long-running computations and serve web pages at the same time, because they are not single-threaded under the hood. That is a Node limitation, not a fundamental computing limitation. Many of those other environments can also trivially use multiple cores within the same OS process.

We are discussing the limitations of Node with regard to long running precisely because it is a limitation that Node in particular has, and that there are other environments that do not have it. We are discussing this limitation precisely because the casual presumption you make in your last sentence that Node is the epitome of programming platform, and therefore if it has a problem then everything else must suck too, is false.

I am staggered at the degree of ignorance of other platforms being displayed by the Node partisans here, because it's not "well, OK, that's nice but in practice I don't care", which I would disagree with but would at least consider debatable (and I mean that quite honestly), but rather just a continuous talking past the Node partisans entirely, with little evidence that they even understand what is being said. I say this from experience over the past couple of days, where it's pretty clear the Node partisans seem fundamentally incapable of considering the concept of "environment that does not have the fundamental limitations of Node".

Several of you seem to be expressing confusion about why some of us aren't coming around to seeing the light. To you all, I'd recommend this essay: http://www.paulgraham.com/avg.html Hint: Node is blub.

Let me be clear about my motivation in writing this, and generally trying to tamp down on the Node hype. First, it's bad for Node. I've seen this cycle before, and as fun as the ride up is, when it is predicated on false claims it tends to explode at some point and the whole thing goes down in flames. (A process that may now be starting.) Second, those of you who only know Node and think it is the epitome need to have it explained to you that there are in fact other tools that are more useful in these cases, so if you ever encounter those problems you can use the right tool for the job. Otherwise, you'll blow untold manhours trying to force a old paradigm to do something you could have done in a more modern one much faster and more effectively. I don't hate Node; I hate the hype, and the damage it is doing to a large group of people by lying to them about what the competition does.

Re: Node.js has jumped the shark

#23
post #20
post #13

This is the worst rant I've read in a while. It starts with lambasting the fact that Ted Dziuba didn't intend the Fibonacci example to be the one role model of comparing Node.js and other languages, and then the Node.js community (or at least a few members of it) rallied around showing that Fibonacci was actually fast in Node. I agree with this. We should be talking about the big picture, not just single implementati…

I thought the point of this article was to generate a cliff notes version of the last week of arguments, coming from the side of someone who thinks node is cancer. Why are we even discussing this?

Yeah. I really want to see this discussion taken in a direction where we're actually talking about Node.js and its computational (non-?)efficiency, instead of this needless back-and-forth.

Re: Node.js has jumped the shark

#24
post #17
post #2

Best part of the post was where someone suggested he increase his heap size to 1GB to get a fibonacci algorithm to run. After pointing this out, a member of the Node.js community (post now deleted) suggested I might have an obsolete version of Node with a 1GB heap limit and that I recompile without the 1GB restriction so that this retarded algorithm can continue eating up all my system RAM.

It is curious that an array with 1 million doubles would take anywhere near a gigabyte in V8. 1000000 * 8B is about 8MB. Even with 5000% overhead for the data structure itself, that's only 400MB. Where did the other 600 MB go?

Call stack?

Re: Node.js has jumped the shark

#25
post #18
post #5

Hmm, sounds more like reddit is the thing that has jumped the shark :) Most people using Node I've had contact with are firmly in the 'right tool for the job' camp. No one sane does CPU intensive tasks inside the event loop... that's what delayed job processor stuff is for.

That's my takeaway as well. Who cares how long a webserver takes to do a Fibonacci loop anyway? The point of a web server is to process lots of relatively small requests quickly and concurrently. Testing node.js with a Fibonacci loop is like testing a Ferrari by seeing how much weight it can tow.

Testing Ferrari by seeing how much weight it can tow would actually get you pretty useful performance metric.

Point of this whole thing is that you cannot reasonably do complex computations in Node. While most "Web 2.0" applications probably does not need to do that in response to request, there are also many web applications that actually do something that might be reasonably called complex cpu-intensive processing in response to user request (although most such things are hard to scale). So it really boils down to "right tool for the job" - and for many practical (but maybe un-popular) problems, Node simply is not the right tool.

Re: Node.js has jumped the shark

#28
I'm pretty sure the only sane way to implement CPU intensive tasks in Node and browsers are web workers. Not sure about the state of web worker support in Node but the resulting code should be straightforward. Even so, the speed of JavaScript is limited, so any serious number crunching will be a pain in the ass.

Node and browsers are seldom used for CPU intensive tasks for now, so it's not a priority.

There are alternatives that handle node's current warts elegantly, can do serious number crunching painlessly, but just don't have the cool factor.

Re: Node.js has jumped the shark

#29
post #13

This is the worst rant I've read in a while. It starts with lambasting the fact that Ted Dziuba didn't intend the Fibonacci example to be the one role model of comparing Node.js and other languages, and then the Node.js community (or at least a few members of it) rallied around showing that Fibonacci was actually fast in Node. I agree with this. We should be talking about the big picture, not just single implementati…

>Wasn't it the point that Fibonacci wasn't the point?

Not of this post. This guy saw the wrong-track rebuttal and it was his rabbit hole into node. Apparently he wasn't impressed.

Re: Node.js has jumped the shark

#30
Am I the only one that considers all of this ranting about Nodejs to be a little bit strange?

I would have never expected a post that was obviously a troll to prompt this much of a reaction on both sides of an issue. That so many of these rants and counter rants made it to the front page of Hacker News is somewhat discouraging.

I have been playing around with node for a few months, and I have tried to stay completely out of this "conversation". With that said, I would like to contribute just a few points:

Bad programmers will be bad programmers regardless of the tools that they use. If they use node and fail to write code that is completely non-blocking, then that is what we call a teachable moment. There is no magic button, all technologies have downsides and tradeoffs.

People keep talking about how nodejs is not good for computationally intensive tasks, but v8 is not a slow environment. Am I the only one that puts computationally intensive tasks into a queue to be taken care of by a pool of seperate processes? I am only just getting into web programming, and it seemed fairly obvious to me that you would not put something like that into your main event loop.

Also, if you find that you must put something computationally intensive in your main event loop, then you should use something like node-proxy or nginx to proxy those requests to a number of "nodes".

Over and over again, I have seen that people complain that node is not a good multithreaded environment. Well, yes... That is the tradeoff of using something that is closely tied to the concept of the event loop.

If you are using node because you feel comfortable with threads and you need threads, then you are making a serious mistake. If you are a new programmer and you are using node because someone told you that it is cool, then you are making a serious mistake. If you are using node because you have a problem that can be solved or addressed with an event loop and you understand the tradeoffs inherent in this approach, then you are doing the right thing.

To use nodejs effectively will often require rethinking your approach to fit the tool that you are using.

Post reply on HN