Live data from Hacker News

Node.js has jumped the shark

unlimitednovelty.com

121–130 of 144 posts

Re: Node.js has jumped the shark

#121
post #90
post #81

Earlier quoted context omitted.

Except that event-driven io is actually the simpler solution compared to threads, isn't it?

Depends. For an application where you have significant CPU work, a simple worker pool (not coded by you), with an accept loop while (s=accept()) { dispatchToWorkerPool(s) } And an application-programmer method handleConnection(s) is pretty darned simple. Just do blocking I/O from your threads and rely on the machine to swap in and out appropriately. For the next level, you can have an evented i/o layer that passes se…

Alternatively, create the socket, fork N processes and have each of said processes run an accept loop. Assuming they're CPU bound, this is going to be pretty much just as efficient and you don't have to prat about with threads -or- evented I/O.

Ain't UNIX grand?

Re: Node.js has jumped the shark

#122
post #94

Earlier quoted context omitted.

As far as I'm aware, they do. GIL means that even using threads, they still need 8 processes to utilize 8 cores. There are more languages than those 3, though, and if those 3 are the languages that you're considering, evented vs blocking i/o is way beside the point when it comes to performance. A super-simple thread-per-connection program with blocking i/o calls from C or Java will demolish the most sophisticated eve…

I did some benchmarks a few years ago playing around with different techniques in C#. If you spin up a thread for each connection, and the connections are short lived, the time spent spinning up a thread will dominate the time spent communicating on the socket. Event loops perform much better than one-thread-per-connection in simple web services because they don't have the extra thread overhead. Its no accident the h…

Could you take a look at SignalR? (http://www.hanselman.com/blog/AsynchronousScalableWebApplica...)

* Since this is dealing with async operations, an IIS worker thread takes an incoming request and hands it off to be processed on the CLR thread pool. At this point, the IIS worker thread immediately becomes available for processing more requests

* Threadpool threads will not be tied up by open connections and waiting for IO. Only when executing actual code/work will they be in use

* To explain why threadpool threads are not tied up: Async operations use async IO. As soon as an I/O operation begins, that calling thread is returned to the thread pool to continue other work. When I/O completes, signal is sent and another thread is picked up to finish up work.

Re: Node.js has jumped the shark

#123
post #86

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…

> 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. >... Programming is hard. Let's stop blogging. The problem with this sentiment is right now too many prog…

"Programming is a pop culture" strikes again, basically.

Re: Node.js has jumped the shark

#124
Author seems to have missed that node-fib is a joke.

Ted Dziuba is clearly a person suffering from profound intellectual insecurity, and a lack of technical acumen. We should offer him our sympathy rather than enable his self-destructive behavior by praising his "previous trolling" activities.

This article, like the poor sad unfortunate Mr. Dziuba himself, seems to be combatting a strawman: the idea that Node.js users and developers are advocating that it be used for everything. It's a fun platform to use, and pretty good for a lot of tasks, but any grownups close to the project (and there are a few of us) are quite vocal about the fact that it is targeted at a very specific use case: IO-bound network programs.

People get excited about the programs they use, and want to see how well it can do things. When your hammer is fun to swing, you want to see what happens with you hit stuff with it. Ted Dziuba has previously advocated using xargs instead of Hadoop for parallel map-reduce, so I would have thought he might understand that sometimes you use the tool that you understand (if it works) rather than something else, even if that other thing might be objectively better for that particular task.

I don't know what node users articles like this or Ted's are talking about. I've been using node almost as long as Ryan, and totally love it. I don't know how we could be more clear about what node is and isn't good for.

At NodeConf, in the Committer Panel, someone asked, "What isn't node good for?" We all rattled off a variety of things. The node community is actually pretty sane. We just laugh at stuff like this, since it's so ridiculous, and make jokes like node-fib.

Re: Node.js has jumped the shark

#125
post #117
post #94

Earlier quoted context omitted.

As far as I'm aware, they do. GIL means that even using threads, they still need 8 processes to utilize 8 cores. There are more languages than those 3, though, and if those 3 are the languages that you're considering, evented vs blocking i/o is way beside the point when it comes to performance. A super-simple thread-per-connection program with blocking i/o calls from C or Java will demolish the most sophisticated eve…

Summary: Ted: "Node is cancer, because it's not the one true tool that can do everything! It may be good at IO bound code but it's not so hot at CPU bound stuff". Node hackers: "Yes it is the one true tool!". Me: face-palm. OK, Threads can be used to do anything, but they are hard, while async is pretty easy (unless you want to do CPU bound stuff). async sucks for CPU bound stuff, but that's not the problem it's tryi…

Please, show us even one Node developer who posted "Yes it is the one true tool!" – or even a sentiment that is remotely similar.

Re: Node.js has jumped the shark

#126
post #112

Javascript integers can only reliably represent values up to 2^53, as they are implemented by 64-bit floats [1]. This means that fib(73) and below are correct, but fib(74) and onwards are almost certainly going to be wrong. The one-millionth fibonacci number, fib(1000000), has 208988 digits when written as a decimal. It takes about a minute to compute fib(1000000) with python 2.6 and write it to file. I am completely…

Minute is too long:

  $ time curl -s http://localhost:1597/sicpfib/1000000 >sicp.out

  real    0m1.856s
  user    0m0.000s
  sys     0m0.000s

  $ wc sicp.out 
       0      1 208988 sicp.out
https://github.com/zed/txfib

Re: Node.js has jumped the shark

#127

Author seems to have missed that node-fib is a joke. Ted Dziuba is clearly a person suffering from profound intellectual insecurity, and a lack of technical acumen. We should offer him our sympathy rather than enable his self-destructive behavior by praising his "previous trolling" activities. This article, like the poor sad unfortunate Mr. Dziuba himself, seems to be combatting a strawman: the idea that Node.js user…

> Ted Dziuba is clearly a person suffering from profound intellectual insecurity, and a lack of technical acumen.

Perhaps, as the one responding to a criticism of a piece of software with personal attacks, you are the one that is insecure? I can understand how, as a fanboy of something that was criticized, you would now take it upon yourself to hurl insults on the person who has wronged you so. This is the internet after all!

> We just laugh at stuff like this, since it's so ridiculous, and make jokes like node-fib.

Actually, you opened this comment by personally attacking Ted, because he insulted some software you happen to be a fan of. I think the most likely reason that you would contradict in such an obvious way something you just wrote is that you don't have a great deal of working memory. Looking at your code on github (https://github.com/isaacs) seems to confirm that theory.

Re: Node.js has jumped the shark

#129

Author seems to have missed that node-fib is a joke. Ted Dziuba is clearly a person suffering from profound intellectual insecurity, and a lack of technical acumen. We should offer him our sympathy rather than enable his self-destructive behavior by praising his "previous trolling" activities. This article, like the poor sad unfortunate Mr. Dziuba himself, seems to be combatting a strawman: the idea that Node.js user…

> Ted Dziuba is clearly a person suffering from profound intellectual insecurity, and a lack of technical acumen. Perhaps, as the one responding to a criticism of a piece of software with personal attacks, you are the one that is insecure? I can understand how, as a fanboy of something that was criticized, you would now take it upon yourself to hurl insults on the person who has wronged you so. This is the internet a…

Your sarcasm sensors are failing. Might want to get those checked.

Re: Node.js has jumped the shark

#130

Author seems to have missed that node-fib is a joke. Ted Dziuba is clearly a person suffering from profound intellectual insecurity, and a lack of technical acumen. We should offer him our sympathy rather than enable his self-destructive behavior by praising his "previous trolling" activities. This article, like the poor sad unfortunate Mr. Dziuba himself, seems to be combatting a strawman: the idea that Node.js user…

> Ted Dziuba is clearly a person suffering from profound intellectual insecurity, and a lack of technical acumen. Perhaps, as the one responding to a criticism of a piece of software with personal attacks, you are the one that is insecure? I can understand how, as a fanboy of something that was criticized, you would now take it upon yourself to hurl insults on the person who has wronged you so. This is the internet a…

> I can understand how, as a fanboy of something that was criticized

Can you define "fanboy" for me, please? I don't know what it means.

> Actually, you opened this comment by personally attacking Ted

I wasn't attacking Ted. Actually, my heart really does go out to him. I mean, he's a human being, right? Could you imagine living with such a crippling psychological disorder? Just think of it. The pain, the emptiness. The worst part is that he's almost certainly too proud to ask for help. It's tragic.

> I think the most likely reason that you would contradict in such an obvious way something you just wrote is that you don't have a great deal of working memory.

Sorry, I lost you like a third of the way through that sentence.

Post reply on HN