Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

tl;dr;

Don't use JavaScript for numerical computation. Don't block your IO loops for CPU intensive stuff.

commentary:

I've never met a Node hacker who would ever do any of those things. This post should be called "Straw man Node.js n00bs jump the shark."

I've written web apps in a wide variety of dynamic languages, and you know what, I've never done anything CPU intensive in the request response loop, ever. This has nothing to do with Node, fibonacci in PHP is just as bad an idea (although it might take you a little longer to realize it, as you've probably got lots of PHP threads running behind your Apache).



If you've been following this argument from the beginning (I'm very sorry to say that I have), you'll notice that Ted's point is not that you WILL do CPU bound tasks in Node, but that Ryan Dahl's misleading statements on Node.js's front page is absurd. Of course no one with any sense will put CPU bound jobs on the same process/thread/event queue as the one processing the request. But you do have to realize, it is exactly that no one will ever do the above that renders Node's existence rather pointless. Threads/processes or events, you'll still pass off the heavily computational stuff to a different processing queue. Events or threads, when that single process starts topping out, you'll still have to launch another process. What makes Node.js different from any other technology that have come before? Nothing except that it comes with a server and it's written in JS. If you like the Node REPL and JS, that's fine, just don't propagate the urban myth that's on Node's front page. I think this is Ted's point IMHO.


My first reaction to this whole business: why would anyone run fibonacci on the same machine that is serving traffic?

For that matter, why would anyone write a CPU-intensive web application in anything but Native Client?




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: