Live data from Hacker News

Node.js has jumped the shark

unlimitednovelty.com

41–50 of 144 posts

Re: Node.js has jumped the shark

#41
post #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…

The whole target of his dissatisfaction is this quote on the Node home page: "Almost no function in Node directly performs I/O, so the process never blocks. Because nothing blocks, less-than-expert programmers are able to develop fast systems." That's bullshit. Evented programming isn't some magical fairy dust. If your request handler takes 500ms to run, you're not going to somehow serve more than two requests per second, node or no node. It's blocked on your request handling.

And all that stuff Apache does for you? Well, you get to have fun setting that up in front of the nodejs server. Your sysadmin will love you.

Basically if you're doing a lot of file/network IO that would normally block, node is great. You can do stuff while it's blocked, and callbacks are easier to pick up and handle than threads. But how often does that happen? Personally my Rails app spends about 10% of its time in the DB and the rest slowly generating views (and running GC, yay). AKA CPU-bound work. AKA stuff Node is just as slow at handling, with a silly deployment process to boot.

Re: Node.js has jumped the shark

#42
Bulldonkey. Javascript on client side will continue for the foreseeable future which means those developers would want to use the same language to do server-side. Just because it hasn't taken hold, doesn't mean it won't.

Re: Node.js has jumped the shark

#43
post #41
post #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…

The whole target of his dissatisfaction is this quote on the Node home page: "Almost no function in Node directly performs I/O, so the process never blocks. Because nothing blocks, less-than-expert programmers are able to develop fast systems." That's bullshit. Evented programming isn't some magical fairy dust. If your request handler takes 500ms to run, you're not going to somehow serve more than two requests per se…

Whoa, whoa. "Just as slow at handling?" It's most likely an order of magnitude faster at handling those.

But you're right, deployment isn't a totally solved problem. Unless you just use Heroku: http://devcenter.heroku.com/articles/node-js

I mean, Node was created in 2009. I don't see anybody bragging about how easy it is to deploy yet; just that it's fast and easy to understand.

Re: Node.js has jumped the shark

#44
post #41
post #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…

The whole target of his dissatisfaction is this quote on the Node home page: "Almost no function in Node directly performs I/O, so the process never blocks. Because nothing blocks, less-than-expert programmers are able to develop fast systems." That's bullshit. Evented programming isn't some magical fairy dust. If your request handler takes 500ms to run, you're not going to somehow serve more than two requests per se…

V8 is a lot faster than Ruby, so I'd expect page rendering to be a lot faster with Node than with Ruby (supposing both use good rendering engines).

Also it seems a lot easier to "outsource" computationally intensive tasks to other processes with Node than with Rails. With node you can stall the response until you receive a result of the computation (within limits), and use the wait time for other tasks. With Rails if you do that, you block one thread of your limited pool of threads. As an example: with my first Heroku Rails app (free hosting) I discovered the pool of threads was one.

Re: Node.js has jumped the shark

#45
post #43
post #41

Earlier quoted context omitted.

The whole target of his dissatisfaction is this quote on the Node home page: "Almost no function in Node directly performs I/O, so the process never blocks. Because nothing blocks, less-than-expert programmers are able to develop fast systems." That's bullshit. Evented programming isn't some magical fairy dust. If your request handler takes 500ms to run, you're not going to somehow serve more than two requests per se…

Whoa, whoa. "Just as slow at handling?" It's most likely an order of magnitude faster at handling those. But you're right, deployment isn't a totally solved problem. Unless you just use Heroku: http://devcenter.heroku.com/articles/node-js I mean, Node was created in 2009. I don't see anybody bragging about how easy it is to deploy yet; just that it's fast and easy to understand.

[deleted]

Re: Node.js has jumped the shark

#46
post #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…

> Am I the only one that puts computationally intensive tasks into a queue to be taken care of by a pool of seperate processes?

Thank you. I really find it hard to believe that the reaction to Ted's post was to mess around with Fib implementations rather than to just say, "use a background queue," and move on.

If Ted has a point at all, it could be that he thinks that people using nodejs don't realize they're running in a loop. Maybe that's fair.

Re: Node.js has jumped the shark

#48
This article is terrible. It boils down to "Ted stirred up some shit in the node community, which I like to troll because I wrote my own programming language and see node as the enemy. As a result of the shit-stirring, people that don't know much about programming defended node. Meanwhile, I wrote my own programming language that nobody uses because nobody is as smart as me, the creator. What's up dawg?"

OK. You have to realize what the community is and isn't. The community isn't every person with a blog. Those people are fanbois; and they exist everywhere.

You've got to filter the noise out. Don't submit every article about something to HN. Don't tell your friends "hey, read this article about a guy memoizing fib, completely missing the point that it was an example CPU-bound algorithm". This is all noise, people that don't know what they're talking about talking.

So, is accidentally blocking an issue in node? YUP! Is leaking space in Haskell something you should worry about? YUP! Is passing a string to a function that requires an int something to worry about in Ruby? YUP! Should you lose sleep at night worrying about whether your Java application is leaking memory? YUP! Should you have nightmares about input data causing your C program to write to memory it didn't allocate? YUP!

Why do you think writing working software is difficult? Because we all have phenomenal tools but are just morons? Nope, we're all morons and we have shitty tools too. All programming languages suck. So you must use them for their strengths, not their weaknesses.

Node.js' strength is that it was designed from the ground up to do everything that can be done asynchronously asynchronously. This is mostly due to the standard library and a bit of C, rather than something intrinsic to the runtime or language. The problems it runs into are CPU-bound computations. People are afraid to split applications into many processes and have some existing tool "scale" them as necessary. As a result, node.js does not work for them, because it doesn't have Java-style threads, which is the hammer they want to use to drive in their screws.

Anyway, I don't really even like node.js that much, but it just feels worth pointing out that no other language solves the denial-of-service problem. If you use preemptive multitasking, you eventually run out of memory for threads. If you use an event loop, blocking starves the other handlers. If you use multiple processes, your process table fills up. The question is: how are you going to deal with it. If you write a thread-based application, you have to figure out how to collect blocked threads (and hope the OS schedules your collector thread). If you write a process-based application, you have to figure out how to collect hung processes. If you write an event-based application, you have to figure out how to ensure you never block. In the end, all three problems are equally hard. It's just that node makes it easy to make 100000 connections hang without killing your Chrome session with your blog editor in it. Write a CGI script in C, use mpm_prefork or something, hit Apache with a million connections, and watch the OOM killer annihilate your system.

Programming is hard. Let's stop blogging.

Re: Node.js has jumped the shark

#49
I'm very glad the node.js community got trolled so effectively. It's been clear for a long time that these most of these advocates are not grounded at all in reality, and it was very entertaining to have them revealed in their ignorant zealotry. Evented solutions have been available in every modern language for some time. They aren't used that often though because they have serious inherent limitations!

I understand the appeal of node.js. It makes the web stack feel much less complex, and I like to reduce complexity as much as the next guy. But in the end, node.js is just a thin wrapper on top of a simple C library. In the end, it really only excels at solving a small, narrow, niche problem.

Re: Node.js has jumped the shark

#50
post #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…

> Am I the only one that puts computationally intensive tasks into a queue to be taken care of by a pool of seperate processes? Thank you. I really find it hard to believe that the reaction to Ted's post was to mess around with Fib implementations rather than to just say, "use a background queue," and move on. If Ted has a point at all, it could be that he thinks that people using nodejs don't realize they're running…

Ted hates queues, too.

But I don't, so instead of playing tough-guy and picking on random open source communities that don't want me, I get to write cool computer programs. Maybe we should all do the same.

Post reply on HN