
Node.js isn't a silver bullet, but it's still a bullet. - crgwbr
http://crgwbr.com/details/41/nodejs-isnt-a-silver-bullet-but-still-a-bullet/
======
jerf
The problem was the hype. It was hyped as a silver bullet, and we even have
issues like people who have drunk too much Node Kool-Aid thinking that Node
has the absolute best multithreading solution, and anything else that doesn't
work exactly like Node is therefore worse, when Node in fact merely has a
polished-but-old-school approach to the problem.

If people are upset that Node isn't a silver bullet, it's because the Node
community never worried too much about making sure that people knew it wasn't
one. It's why I've been saying that when I actually come onto HN here and try
to puncture the hype, I'm actually doing Node a _favor_ , by calibrating
expectations closer to reality.

Node isn't useless, but the problems with the Node approach are well-
understood since it's an approach the greater programming community has about
20 years of experience with, as are the potential workarounds, and even just
how far the workarounds can be taken before you run into problems with the
fact the underlying language is only so powerful. This sort of event-based
approach just intrinsically scales poorly as program size increases, even with
all the grease and goop you can muster up in a language that has closures.

~~~
huggyface
What hype? Whose hype? I think it's a strawman.

There is a certain class of problem that often appears on the web presentation
layer -- the interaction between the browser and a cornucopia of back-end
sources and systems -- where nodejs is often a very good fit, and it is almost
always what enthusiasts of the platform are speaking of.

That's it. Nothing more.

I've seen various angry retorts that opine that become it isn't suitable for
various very unsuitable purposes (see - calculating prime numbers, etc), it
sucks. Such misdirection has no place in this industry.

~~~
jeremymcanally
If you've spent any appreciable amount of time on Hacker News, you'd know that
there has been pretty big hype behind Node.js. If you don't see it, you're not
paying attention. Anecdotally, I work with a lot of fairly inexperienced
developers with my clients, and I honestly can't tell you how many times
they've suggested we "rewrite (x) in Node.js because it's faster" or "let's
switch this to Redis" with no real reason behind it. When one digs down, we
eventually arrive at "I read a blog post that said it was real fast and
stuff."

I like Node a lot. I think it solves some hard problems, but just like NoSQL,
TDD, and a bevy of other things, they're not silver bullets even if they're
painted like one.

~~~
InclinedPlane
A lot of buzz about Node shouldn't be confused with a lot of "hype". If people
are talking about something a lot and using it for _very specific projects_
that's very different from people evangelizing it as a silver bullet solution
for everything.

~~~
sausagefeet
A lot of buzz can qualify has "hype" in my opinion. Node has gotten a lot of
attention over the past year, just like Erlang got a few years before and
Haskell in there too. The only difference people actually started using Node.

------
ISeemToBeAVerb
So far, everyone seems to agree that every project has unique problems and
solutions, and that node.js has a place.

The real argument here seems to be that people are tired of "node hipsters"
and "hype".

Get over it.

What's the point in wasting time being angry about what other developers are
thinking or doing? If they're wrong, they'll figure it out eventually.

It's the online equivalent of bitching about everyone that wears skinny jeans
and shemagh scarves.

Then, just to set things straight, people have to come along and write
reasonable posts (like this one) in response.

Keep the anger to yourself, so the rest of us can get on with it and use
whatever tools are right for our job.

~~~
gerggerg
Plus all the hype just makes programming better. More eyes, more research,
more usage, more knowledge, more code-as-art projects. I don't use node, but
I'm envious of the people who have all that time to play around with it. Is it
the best solution for any problem? That's up to no one but your own expert
opinion. It really doesn't matter. What matters is people are programming and
they're having fun doing it.

You try to use Node as a production solution and it(or you) fell short
somewhere? Great, you just learned something and are a better programmer
because of it.

~~~
freshhawk
I partly agree, but surely the annoyance at things like this is because those
eyes and research could have been on better potential projects that didn't get
the hype.

It's naive, but I always felt the annoyance comes from the fact that people
like a meritocracy and hype being such a large part is irritating. Luck you
can deal with, you know its isn't going away. It's harder to internalize that
the hype aspect is natural human behavior and it isn't going away either.

What I don't get is people who take that fact and decide it's not worth trying
to do things better.

------
ryankshaw
Just wanted to point out the apples to oranges comparison being made:

The article argues that node's sweet-spot is: "to enable real-time propagation
of events and state-changes between clients. You could do the same thing with
long-polling ajax or even frequent polling, but those both come with the cost
of tying up unnecessary worker threads on the server and dealing with extra
requests."

yes we all know that, that is why no one is suggesting that. the better
comparison would be to put it up against twisted or event machine, which also
use an event loop to do non-blocking IO. but you dont have to deal with
callback hell, and even as a javascripter myself, I would say that I would
rather code in python or ruby.

you dont have to use node to do real time, web sockets, etc.

~~~
underwater
Node.js has much better marketing. From the outset Node made a big deal of its
event driven architecture and why I should want to use it.

Twisted's website, on the other hand, fills the front page to use verbose,
boilerplate-heavy code examples. They mention an "event-driven web server" but
don't say why I'd want that. If I'm still interested and click through to
their example's I see stuff like "pbsimple.py - simplest possible PB server"
or "ampserver.py - do math using AMP". Thrilling.

~~~
moe
I haven't used twisted in ages, but I have to second that.

It's quite a solid framework - with possibly the worst marketing in software
history.

------
maratd
The problem with Node.js is that it's very good at it's original purpose and
terrible at everything else. Node.js is excellent for building network
services. It is terrible at general server-side computing. If you need a
server that consumes websocket connections, it's great. If you need to build a
CLI script that installs and upgrades various software packages, not so much.
If you need a chat server, it's great. If you need to build a CMS, not so
much.

Node is great for building services. Not so much for software that consumes
those services.

~~~
enjo
Yep...and if you use it for that it's brilliant.

My latest project runs Python/Pyramid and MongoDB for the more traditional
computational stuff. We have a notification architecture running through
node.js/socket.io sending real-time events down to the browser.

It works beautifully.

All of that COULD have been implemented within the Pyramid layer (or
Twisted..or whatever), but it would have been much more difficult and time-
consuming to do.

~~~
maratd
I'm doing something similar, only with PHP + MySQL for the more traditional
stuff. Node.js runs a websocket server + http + fastcgi. Browsers connect as
clients. PHP connects as a client too when it needs to. Node.js facilitates
the back and forth.

I could have done it in PHP, but it would have been an absolute nightmare.

------
ronreiter
Using node.js for server side programming is a new trend which is common
around people who only know Javascript, and choose node.js because it's a
language they know. This is a HUGE problem, because even though node.js has a
huge community, it seems they do not learn from the mistakes of older and more
experienced languages. They just try to re-invent everything, which results in
crappy systems.

~~~
GnarlinBrando
Isn't that just part of the process of exploring the new technology though?
Sure a lot of that will fail, but people will learn from what works and what
doesn't. I think it is less of a problem that people who know javascript are
choosing node because they know js (like myself), and more of a problem that
there are so many posts complaining about people wanting to expand their
horizons instead of trying to actually educate those people.

~~~
tensor
I guess the take home here is that Node.j _is not_ new technology. It is old
technology reimplemented in a new language. In that sense, rather than fumble
through the same mistakes and rediscover the same limitations others have, why
not read a book on event driven programming instead?

~~~
GnarlinBrando
That is sort of like saying a smart phone is not new technology. In a sense it
is not. It is the combination of two already existing technologies, but isn't
that pretty much what all new technologies are? On top of that it is a new
language and each language is going to be better or worse at doing certain
tasks. It is also frequently more beneficial to actually learn something for
yourself.

As for your second point, client side programming (GUI in general) is very
event driven so a lot of people coming to node because they have javascript
experience have event driven programming experience. And as far as I know (I
may just be ignorant of it, and would love to know if I am wrong) there is no
go-to text on event driven frameworks, nor has there been anything as popular
as node that has been so focused on events besides tcl/tk which there isn't
really a wealth of readily accessible knowledge about.

Again, I could be totally wrong, but unless you can point towards where
someone working with node can learn these lessons I am gonna go on ahead
thinking that node and it's community are doing well. There is after all a
wealth of community driven documentation and tutorials being assembled
already. I would hazard a guess that the amount of information available to
someone new to node is more robust than many older
frameworks/languages/programming technologies in general.

~~~
tensor
No, there are sometimes genuinely new technologies: ideas or frameworks that
have not been previously explored. Google's PageRank algorithm is a good
example. It's not often that you see genuinely new ideas in programming
languages, although it does happen occasionally. Javascript as a language
doesn't push any boundaries, although it's an alright language overall.

I don't know what books would be best to learn event driven programming. That
would be a good question to have an answer to. My point in suggesting a book
is that it's the _concepts_ here that matter, not that you are using a
Javascript, Python, Ruby, or C# implementation, or a language built around the
idea like Erlang. Once you know the concepts, you can quickly and easily pick
up or even build a framework in any language.

I don't think anyone is suggesting that Node and the community isn't doing
well. It's just that many of us are quite confused by the massive hype around
it. Javascript might be a fine choice in some situations, but in general, on
the server side you have many different languages to choose from and many
(most?) of them also have competent event driven frameworks available. It
would surprise me if most development shops didn't have server side developers
who work daily with a language other than Javascript.

~~~
GnarlinBrando
Most technologies are made up components of older technologies or ideas, I am
not saying that you cannot do something genuinely new. But I am also sure that
if you talk to the guys who built pagerank they probably had some inspirations
and stuff they took ideas from. It is all perspective.

I agree its the concepts that matter, it is just that whenever I hear this
argument no one (who is making it) can actually point out exactly what those
concepts are or even point to any reason why another event driven framework
would be better (besides the obvious I already know the language gambit which
applies to node equally, if not more). Many people cant even point out the
obvious frameworks that do similar stuff, with maybe twisted being the
exception.

I would be incredibly surprised if even a handful of dev shops have server
side devs who only work in node. But I don't really see what that has to do
with anything.

I get that this is mostly about the 'hype,' but if Node and the community are
doing well, have good documentation and we are seeing the technology used to
implement some cool stuff (trello for example) then how is the hype confusing?
That is the thing that I don't get. Node is now a cross-platform environment
that fits easily into PaaS and SaaS concepts, is gaining hosting options by
the day (heroku, azure, etc) has a huge library of third party modules, and
the majority of people using it seem to understand what it is and is not. It
seems obvious to me that any new technology, or new implementation of a
technology if that makes you feel better about the terminology, that has all
those things going for will generate a certain amount of hype.

------
rue
To extend the metaphor, Node _is_ a silver bullet.

Silver's way more expensive than lead and offers little or no improvement
unless you're shooting at werewolves.

~~~
pjscott
But when you _are_ shooting at werewolves, silver bullets are definitely the
thing to use.

A while back, I had an application which needed to do some fairly complicated
string manipulation, both on the client side and the server side, and by using
Node, I was able to write and debug that code once. There are good use cases
here.

~~~
rue
Exactly! I'm frankly not sure how “silver bullet” came to mean a _general_
solution…

~~~
freshhawk
I always thought that it was because in the metaphor the "werewolf" was
"programming is hard". There is no silver bullet to kill the "I have to make
trade-offs as this gets more complex!" monster.

I could be wrong, I have no reference or even a memory of learning this so I
have either forgotten or I just made this up.

------
trustfundbaby
First they ignore you, then they laugh at you, then they fight you, then you
win \--- Gandhi

This happens with every _popular_ new tech that does things differently from
how its been done before. Since I've been developing I've seen it happen with

PHP

Rails

mongodb

now node.js

As long as there is a critical mass of developers that want to use a certain
technology, there is nothing that anyone can do to stop it. They'll keep
making it better and better until the naysayers have little or nothing they
can criticize, and then it won't matter because everyone will be using it
anyway.

Its great to see people stepping out to tamp down the hype though, that's the
necessary next step in the evolution of any new tech.

~~~
InclinedPlane
I'm going to make a guess at your age based on this list, I predict you are
less than 30 years old.

This is because your list is missing Java. During the mid to late 90s Java was
Jesus. It was the solution to every possible computing problem imaginable. The
amount of hype surrounding Java puts anything we've seen since to shame, even
NoSQL, "cloud" computing, social networking, etc. It was infuriating. And it
took a few years of everyone and their mother banging away at Java development
before people realized that it wasn't the Messiah, it was just a technology
with a few advantages as well as some disadvantages, and that it was a good
idea to only use it sometimes and keep using other languages when appropriate.

Remember that JavaScript has absolutely nothing to do with Java except the
name was changed and some of the syntax was changed to make it more closely
resemble Java merely out of a crass marketing attempt on Netscape's part.

------
ww520
Node (or the people hyping it) suffers the expertise projection symptom. When
people seeing Node is great for doing one thing (async network handling), they
automatically project it to be great for other stuffs. That's where the hype
falls apart.

------
radagaisus
Node was the best choice for our service, I'm willing to go to court with
this. We need a fast fire and forget server to talk with Redis continuously,
what's a better option? Erlang? I think there are ~3.6 developers in Israel
that know Erlang.

~~~
gerggerg
Sinatra?

~~~
radagaisus
Why? we have two routes (twitter-connect, facebook-connect), socket.io and
redis pub/sub. that's it.

~~~
gerggerg
For no reason other than it would be a fine alternative. I'm sure your Node
solution is performant and simple, and you should stick with that but no doubt
a simple server written in ruby or haskell or python or anything really would
get the same job done.

~~~
radagaisus
I considered EventMachine and Twisted and decided to go with Node. 90% of the
requests to the server will be "take this and push it to redis". Another
factor in the decision was the other programmer on the project doesn't know
Ruby or Python. Another factor was that I'm young, not constrained, and I want
to learn everything I can get my hands on.

~~~
gerggerg
Sure, that all sounds great. I'm not trying to say you made a bad decision.
You're original comment, though, came off as overly forceful, and a mild-bit
condescending to the erlang community for no apparent reason and I decided to
put my 2 cents in about it. There's no reason why your exact service couldn't
be written in another language other than pure personal preference. And thats
fine but you need to loosen up a bit about it.

~~~
radagaisus
I have more bad things to say about Node :) There are just not enough Erlang
hackers around here to consider it, same for Haskell. Even Ruby isn't wildly
used around here.

------
jdfreefly
Languages are tools. Good carpenters use the right tool for the right job. Can
you use sand paper to sand a door down to fit the space? Sure...but there is a
reason the plane was invented.

~~~
wmf
But what if Node isn't the right tool for _any_ job? What if everything Node
does well has already been done even better and years earlier by Erlang?

~~~
crgwbr
That's clearly not the case. Sure, other event-based web frameworks exist, but
Node definitely makes it easier than ever to write event-based apps.
Additionally, being able to share code between the server and client is a very
interesting and useful feature. Finally, Javascript is unlike really any other
language in existence. It has many of the benefits of a functional language,
without being nearly as intimidating as something like Haskell. Node certainly
has its place.

~~~
freshhawk
Ease of novice development is definitely a worthy goal and a valuable niche to
carve out (like PHP).

But there will be backlash if too many of those novice supporters go overboard
in their enthusiasm without any experience to put it in context.

------
hello_moto
I like the smartness of today's blogger: write something that attack another
popular internet rant. You'll get instant pageviews.

~~~
gerggerg
It's been going on since at least news papers. Go to the grocery-store and
take a look at the magazines in the checkout isle. Humans love to watch unfold
what they think is a controversy. It's entertainment.

------
winteriscomming
People love new things and the story of the new guy overtaking the evil status
quo. Node and JS in general seems very hyped right now. Every day there is a
new blog about accomplishing something in these technologies that was entirely
possible with alternatives for the last many years. But its new and exciting
and blogged about. Because it is so new, there are not really any accounts of
what a Node architecture does to your maintenance, refactoring, upkeep on a 5
year old application that no one cares about anymore (and the team that built
it left).

Maybe it's a sign that the hipsters are rising as the neckbeads retire.

------
joshmanders
Good article. I never get why people of one language bash another language. No
language is perfect for every task. Use what is good for you and works. Don't
bash others because you don't use it.

~~~
hello_moto
That's what geeks do. Seriously.

Geeks love to debate technical stuffs.

------
paramaggarwal
Each language fills a void, a different way of doing something, just because
it can be done. Because it is possible. And there are always uses for every
way something can be done.

Node.js is nothing different, it has its pros and cons. You simply cannot tag
it as 'good' or 'bad'. You are smart if you use it where it suits you. You are
silly if you just try to trash it.

------
swang
I get what the author is saying, but don't we all know that all languages are
"bullets" but non-silver bullets aren't going to slay the beast
(metaphorically, software design/management).

------
gfodor
In other words: if you're rendering HTML with node, you're probably doing it
wrong.

------
alisnic
I couldn't agree more with the author.

