Live data from Hacker News

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

crgwbr.com

51–60 of 110 posts

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

#51
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 ... To my knowledge everything I can do in node is asynch

As soon as you code an endless loop in a function it blocks the server forever. Do a long calculation: it blocks for the time running. Node is no magic dust which turns everything it touches into asynch high speed code.

Node is asynch only when it comes to operations that are external to your code. (network, file system) . One could even argue that CPU intensive code being external to node but running on the same server could block if it's not running on a different CPU altogether.

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

#52
post #47

Earlier quoted context omitted.

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.

My interest in having a boring argument with a language bigot approaches nil. But yes, aside from the very namesake of functional programming (a vague language grouping with no disciplined definition), yeah there's nothing else there...groan.

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

#54

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.

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.

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

#55
post #4

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

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

Sources

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

#56

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

"When one digs down, we eventually arrive at "I read a blog post that said it was real fast and stuff.""

That doesn't show that there was too much hype. That just shows there is enough popularity for an inexperienced developer to find it on their radar.

If it was overly hyped, you'd find a lot of experienced developers blogging about how they were horribly mislead and that node doesn't do what it advertises.

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

#57
post #26

Earlier quoted context omitted.

I'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.

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

I disagree with this. Handling one blocking operation is as easy as handling n blocking operations. Yes, you have to handle them, or they will block.

The alternatives are to run everything in its own process, which uses too much RAM or to use threads, which are very difficult to reason about. (Did you really acquire locks in an order that guarantees you will never deadlock? Is your date formatting library threadsafe?) Finally, there is threads and STM, but STM adds overhead and retrying transactions wastes resources.

None of those solutions are very good, and node is in the same place: it is another not very good solution to concurrency. Right now, nobody in the world can come up with anything better. To do concurrency right, you have to be very careful, and those caveats apply to all the other concurrency mechanisms. node's event model is basically equivalent to the other mechanisms; fatal if done wrong. Doing one thing in one place makes the process model work. Not having any state shared between application operations makes threads work. Event-driven systems are a compromise between the two: you can share state between logical threads of execution, but the order in which state updates occur is deterministic.

Every model has its strengths and weaknesses, and node has strengths and weaknesses.

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

#58

Earlier quoted context omitted.

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.

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.

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.

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

#59
post #4

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

The "cloud" has been overhyped up the wazoo for years. That doesn't make PaaS meaningless or less useful. PS. Could you point out a few egregious examples of the node community overhyping Node.js?

Well, to quote Ryan Dahl: "i wish for less #nodejs hype."

https://twitter.com/#!/ryah/status/8519974729

Also, I regularly see people making claims like "You can’t shoot yourself in the foot in any way" (http://venturebeat.com/2012/01/24/node-at-google-mozilla-yah...) and other variations involving issues around performance and concurrency.

I think it stems from some very smart people talking about why Node is better, then others trying to articulate the same thing without completely understanding what they're saying.

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

#60
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.
Post reply on HN