Live data from Hacker News

Node.js has jumped the shark

unlimitednovelty.com

101–110 of 144 posts

Re: Node.js has jumped the shark

#101
post #94
post #92

Earlier quoted context omitted.

I think in this case, we have yet to see the master put anyone on their ass. We have non-masters slinging insults and ineffective demonstrations. Don't typical Python and Ruby deployments also need 8 processes to utilize 8 cores? If I'm not mistaken, this is in fact how Heroku works.

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…

> A super-simple thread-per-connection program with blocking i/o calls from C or Java will demolish the most sophisticated evented system you could ever design in a scripting language

Are you really sure about that? Perhaps 5 years ago, but have you tried recent versions of node (V8) or Python? I have, and even as an old-timey programmer, I'm impressed.

Re: Node.js has jumped the shark

#102
post #76
post #21

Earlier quoted context omitted.

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…

My take on that article is that the fact that node is written in "blub" could equally be seen as an advantage. Popularity will also mean a broad based skill set ready to work for you when it comes hiring time. Of ever developer who's worked in Ruby, PHP, C#, Blub... they've all had to have their hands on Javascript. So this one-ring-to-rule-them-all isn't necessarily about being the best & most powerful language ...…

If you really want to find out about what makes Node.js tick, do yourself a favor and spend some quality time within C and the related I/O APIs, like select/poll, epoll, kqueue, AIO and all that stuff.

After that you'll have 3 revelations:

(1) everything sucks badly

(2) non-blocking I/O really is available in every platform and programming language

(3) you'll learn to appreciate older developers that have solved these problems years ago, without ranting on stupid blogs

Re: Node.js has jumped the shark

#103
I think the way we talk and reason about tech has jumped the shark.

* JavaScript is a nifty little language. * V8 is a nifty little VM. * Node is a nifty little project. * Isn't it lovely that Ryan Dahl had an idea and like, actually did it! He doesn't write ranty blog posts (often), he writes code for people! * There are worse things to rant about. Things that come to mind are the GFC, the US Govt. Bailout, indications it didn't work, education, unemployment. Lots worse things than Node JS.

P.S. If you ever deployed a Rails app to production then, well my friend, the joke really is on you!

Re: Node.js has jumped the shark

#104
post #96
post #90

Earlier quoted context omitted.

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…

That thread pool isn't actually that simple. How many threads do you use? If you throw 1,000 threads at the problem with a 2MB stack each, that's 2GB of DRAM you've thrown away (instead of 20MB * ncores per Node process) -- DRAM that could be caching filesystem data, for example, which could have a huge impact on overall performance. With Node, the DRAM and CPU used scales with the number of cores and actual workload…

What a load of crap... you just wasted 2gb of address space not of DRAM... You'll "waste" exactly up to the amount of stack each thread uses, rounded up to PAGE_SIZE which is usually 4kb

Let me guess, a nodejs fan?

Re: Node.js has jumped the shark

#105
post #97
post #92

Earlier quoted context omitted.

I think in this case, we have yet to see the master put anyone on their ass. We have non-masters slinging insults and ineffective demonstrations. Don't typical Python and Ruby deployments also need 8 processes to utilize 8 cores? If I'm not mistaken, this is in fact how Heroku works.

No, heroku doesn't work that way, heroku lets you spin up processes and those processes can be threaded. I use JRuby and get one process that can use all cores.

I think it's safe to say that typical Ruby deployments (as I qualified) are not using JRuby, especially not those on Heroku. Thus, even if the process spawns threads, they will be limited to one core at a time.

Whether JRuby's threads are actually running on multiple cores simultaneously depends on what mode Heroku is running the JVM in.

Re: Node.js has jumped the shark

#106
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…

Didn't a similar event occurred a few years back (in HN as well)? Like around 2006-2007 with Ruby on Rails and the framework war? Big waves, big disagreements, flame-wars.

Good prediction though Zed, I'm seeing ghetto Ruby (Rails related code) lately.

Then it becomes the language wars between newer dynamic/functional languages.

Now it becomes Node.js vs the rest of the world. Are we going to see crappy JavaScript code soon?

PS: At the very least, Rails brings real productivity value to the table (cause all other frameworks sucks back then).

Re: Node.js has jumped the shark

#107
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…

This post from Glenn Vanderburg a few years back is incredibly relevant:

http://www.vanderburg.org/blog/Software/Development/sharp_an...

Especially this excerpt:

"Weak developers will move heaven and earth to do the wrong thing. You can’t limit the damage they do by locking up the sharp tools. They’ll just swing the blunt tools harder."

Re: Node.js has jumped the shark

#108
post #86

Earlier quoted context omitted.

> 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…

Didn't a similar event occurred a few years back (in HN as well)? Like around 2006-2007 with Ruby on Rails and the framework war? Big waves, big disagreements, flame-wars. Good prediction though Zed, I'm seeing ghetto Ruby (Rails related code) lately. Then it becomes the language wars between newer dynamic/functional languages. Now it becomes Node.js vs the rest of the world. Are we going to see crappy JavaScript cod…

crappy JavaScript code soon

Is there any language in which a larger quantity of crappy code has already been written?

Re: Node.js has jumped the shark

#109
post #94
post #92

Earlier quoted context omitted.

I think in this case, we have yet to see the master put anyone on their ass. We have non-masters slinging insults and ineffective demonstrations. Don't typical Python and Ruby deployments also need 8 processes to utilize 8 cores? If I'm not mistaken, this is in fact how Heroku works.

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 hello world app on nodejs.org is this sort of service.

But by far the fastest technique I found was to use a thread pool and an event loop together. When there was any work to do (new connection or new data), I scheduled the next available thread from a thread pool to do the work. This technique requires that you deal with both callback hell and thread synchronization. But, its blazing fast. Way faster than you can get with a single nodejs process.

The code is also many times more complicated, so it really depends on what you're doing. Despite knowing how to make a super high performance server, I do most of my work in nodejs. - It performs fine in most applications.

Re: Node.js has jumped the shark

#110

Earlier quoted context omitted.

Didn't a similar event occurred a few years back (in HN as well)? Like around 2006-2007 with Ruby on Rails and the framework war? Big waves, big disagreements, flame-wars. Good prediction though Zed, I'm seeing ghetto Ruby (Rails related code) lately. Then it becomes the language wars between newer dynamic/functional languages. Now it becomes Node.js vs the rest of the world. Are we going to see crappy JavaScript cod…

crappy JavaScript code soon Is there any language in which a larger quantity of crappy code has already been written?

Good point. Should've put "Server-Side JS code" maybe?
Post reply on HN