10 ms·
Node.js isn't a silver bullet, but it's still a bullet.
- radagaisus 15y agoNode 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 15y agoSinatra?
- radagaisus 15y agoWhy? we have two routes (twitter-connect, facebook-connect), socket.io and redis pub/sub. that's it.
- gerggerg 15y agoFor 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.
- mechanical_fish 15y agoruby or Haskell or python or anything really This phrase actually captures, succinctly, a big reason for Node's success: If you decide not to use a JavaScript-based tool you have to decide what to use instead. The ensuing debate will often take three times longer than just using Node. Everyone who touches the web needs to know JavaScript, so apart from any other consideration there's an automatic tendency to try the thing that's written in JavaScript before trying anything else.
- radagaisus 15y agoI 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 15y agoSure, 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 15y agoI 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.
- deleted 15y ago[deleted]
- ronreiter 15y agoTornado. And you just need a Python programmer and 1 day of work.
- joshmanders 15y agoGood 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.
- ascendant 15y agoYou start getting into some deep philosophical stuff going down that path. Why is there such a huge Android vs iOS debate? Because people define themselves by what "team" they're on. Be it computers, phones, programming languages, sports, politics, etc. It's "us" vs "them".
- hello_moto 15y agoThat's what geeks do. Seriously. Geeks love to debate technical stuffs.
- jdfreefly 15y agoLanguages 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.
- deleted 15y ago[deleted]
- wmf 15y agoBut 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?
- fosk 15y agoThis statement without any kind of explanation, is totally meaningless. Please explain.
- crgwbr 15y agoThat'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 15y agoEase 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.
- jerf 15y agoThe 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 15y agoWhat 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 15y agoIf 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.
- deleted 15y ago[deleted]
- maratd 15y agoThe 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.
- robbrown451 15y agoI'm not sure why it is bad for building a CMS. Admittedly, node isn't all that mature so doing so might be a little lower level right now than doing the same with, say, Rails. But it has one huge advantage which is that any modern CMS is going to have a good chunk of client side code, and there are immense advantages to having the same language on the client and server.
- maratd 15y agoThe majority of services out there are self-sufficient. Take a very simple http server. It needs to talk to the local filesystem and serve the content requested. The only thing in that equation that might block is the filesystem. Node provides you the tools to deal with that and more. Building an http server in node is enjoyable, easy, and the end result performs well. The majority of software like a CMS is not self-sufficient. It needs a database, a filesystem, it talks to the http server, it might talk to a dozen other services (generate thumbnails, upload some files to a CDN, scan for viruses in an upload, etc. etc.). You get the idea. Each external dependency is a blocking dependency. You need to handle it and it isn't easy. Node provides you the tools, but unlike in our first example, where the only thing that blocks is the filesystem, here you have dozens of services that block, with hundreds of pain points. Writing code becomes a chore that is very unpleasant. That's not the worst of it. If you miss a blocking operation and don't handle it properly in node, which is very easy, your entire server will go down. In a thread-based or multi-process server-side language mistakes are painful, but not fatal. In node, missing a blocking operation is fatal. The node guys get this. That's why they're busy trying to cook up a solution around this problem. But they don't talk about it or advertise it. As of right now, node is definitely not a general purpose solution. It is, however, an excellent solution where you don't have a lot of dependencies that block.
- ryankshaw 15y agoJust 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 15y agoNode.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 15y agoI 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.
- kylebrown 15y agoThere's other reasons to like node besides the non-blocking IO. For me, its being able to reuse code on the client and the server. Not sure why the node bashers seem to overlook that one.
- the-cakeboss 15y agoSerious question: What might you want to reuse on the client side?
- deleted 15y ago[deleted]
- rue 15y agoTo 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 15y agoBut 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 15y agoExactly! I'm frankly not sure how “silver bullet” came to mean a general solution…
- freshhawk 15y agoI 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.
- winteriscomming 15y agoPeople 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.
- swang 15y agoI 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).
- hello_moto 15y agoI like the smartness of today's blogger: write something that attack another popular internet rant. You'll get instant pageviews.
- gerggerg 15y agoIt'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.
- ISeemToBeAVerb 15y agoSo 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 15y agoPlus 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 15y agoI 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.
- InclinedPlane 15y agoTo be honest, in the case of node.js I don't think there's an overabundance of hype. There is some hype, to be sure, but mostly there's just a lot of buzz from people who are using node and enjoying it. As long as things stay out of the snake oil zone I think it's ok. And that applies to NoSQL, "cloud" computing, mobile apps, etc.
- gfodor 15y agoIn other words: if you're rendering HTML with node, you're probably doing it wrong.
- ronreiter 15y agoUsing 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 15y agoIsn'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 15y agoI 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 15y agoThat 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.
- alisnic 15y agoI couldn't agree more with the author.
- trustfundbaby 15y agoFirst 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.
- stock_toaster 15y agoI think the hype cycle[1] is more apt than the Gandhi quote in several of the cases you mentioned. In fact, I would say that node has simply passed the "Peak of Inflated Expectations" and is/has-been descending into the "Trough of Disillusionment". [1]: https://en.wikipedia.org/wiki/Hype_cycle https://en.wikipedia.org/wiki/Hype_cycle
- GnarlinBrando 15y agoI agree with you completely. I thing it so important to remember both the value of criticism and that the technology is still growing and adapting.
- InclinedPlane 15y agoI'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 15y agoNode (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.
- paramaggarwal 15y agoEach 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.