Live data from Hacker News

Node.js isn't a silver bullet, but it's still a bullet.

crgwbr.com

41–50 of 110 posts

Re: Node.js isn't a silver bullet, but it's still a bullet.

#41
post #12

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…

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.

Re: Node.js isn't a silver bullet, but it's still a bullet.

#42
post #26

Earlier quoted context omitted.

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

That makes sense, mostly, but I'm a bit confused as to what you mean by saying it is easy to "miss" a blocking operation such that it will take down your server. It seems pretty hard to have any operation be blocking in node. To my knowledge everything I can do in node is asynch (with exception of a few blocking file functions, but I don't use those as there are asynch versions which are recommended anyway) I'm also…

If you integrate to an external native library it might block.

Re: Node.js isn't a silver bullet, but it's still a bullet.

#43

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

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.

Re: Node.js isn't a silver bullet, but it's still a bullet.

#44

Earlier quoted context omitted.

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

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.

ruby 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.

Re: Node.js isn't a silver bullet, but it's still a bullet.

#45
post #26

Earlier quoted context omitted.

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

That makes sense, mostly, but I'm a bit confused as to what you mean by saying it is easy to "miss" a blocking operation such that it will take down your server. It seems pretty hard to have any operation be blocking in node. To my knowledge everything I can do in node is asynch (with exception of a few blocking file functions, but I don't use those as there are asynch versions which are recommended anyway) I'm also…

> It seems pretty hard to have any operation be blocking in node.

A blocking operation is essentially anything that takes a while to complete. It blocks everything, because node is focused on doing that one thing. Usually this happens with external services, where node requests something and then waits for a response. Those are easy to spot. But you can write code in any language that takes a while to do something. And it's very easy to do so and miss your mistake =)

> I'm also a bit puzzled by your statement that there are people working on the problem but not talking about it.

I don't mean it's a secret or something. They talk about it on Google Groups and in change logs. I'm saying that's something that should be on their front page of their website explaining things. Maybe have a nice little chart of dos and don'ts.

Re: Node.js isn't a silver bullet, but it's still a bullet.

#46
post #25

Earlier quoted context omitted.

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…

If you do not already think it has been hyped, I am at a loss as to how to prove it to you. Let me put it this way: Why do we hear so much about Node when it's just another event-based single-threaded "asynchronous" execution environment running on a dynamic language, like half-a-dozen others that preceded it? Basically, it won the hype lottery. Whatever nice things you may have to say about it apply reasonably well…

I don't think you've taken the time to ask how it might be different from even the other evented systems that have come before. When something that looks similar to what has come before seems to get undo attention, you should perhaps ask if you're missing something.

All languages, platforms, frameworks etc have strengths and weaknesses. There are lots of factors that contribute to a certain solution being "really good" for a problem as opposed to "serviceable but not great". Engineers look for great solutions to problems. They don't stick with ones that are sub-par just to avoid explaining to nay-sayers why they decided to switch.

Re: Node.js isn't a silver bullet, but it's still a bullet.

#47
post #25

Earlier quoted context omitted.

If you do not already think it has been hyped, I am at a loss as to how to prove it to you. Let me put it this way: Why do we hear so much about Node when it's just another event-based single-threaded "asynchronous" execution environment running on a dynamic language, like half-a-dozen others that preceded it? Basically, it won the hype lottery. Whatever nice things you may have to say about it apply reasonably well…

All else isn't the same. For one, this event-based, single-threaded "asynchronous" execution environment running on a dynamic language uses javascript , which is a surprisingly powerful functional language that just happens to run on the other side of the web server conversation in the context that we are discussing. Being able to standardize and coalesce the two sides of the web pipeline -- regardless of what magic…

Calling JavaScript a functional language on the pure basis that it has first class functions and closures is sort of stupid. Aside from that, what other properties does JS enforce that are deemed functional?

I'll save you some time: none.

Re: Node.js isn't a silver bullet, but it's still a bullet.

#48
post #41
post #12

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…

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

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.

Re: Node.js isn't a silver bullet, but it's still a bullet.

#49
post #41
post #12

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…

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

You can run pyramid through gevent wsgi and use gevent-websockets to get the same functionality. Highly performant, no callback soup, and all one stack.

Re: Node.js isn't a silver bullet, but it's still a bullet.

#50
post #22

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.

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.

Post reply on HN