Hacker News new | ask | show | jobs
by andrewcooke 5483 days ago
it's not a language at all. it's a library for writing server-side code in javascript. it's event driven, like python's twisted. in fact, it's hard (if you assume people are rational [edit: and have perfect access to information]) to see why people find nodejs so cool, yet have been ignoring twisted for years.
3 comments

I think it was a combination of things. One, the timing was nice because JavaScript was getting more and more attention as its engines were starting to seriously compete for speed. Two, I think the fact that it was JavaScript on the server really helped get it a lot of buzz as it was somewhat "controversial". "Controversial" because I can't think of another language whose users are so split between liking and hating it. Having it invade the server meant a lot of people's blood began to boil as they thought of having to potentially deal with it outside the browser, and a lot of other people who were excited about being able to use it outside the browser. Either way, the combination of love and hate gathered a lot of talk and attention in my opinion.

Now to contrast this with python: I personally have never heard of Twisted before all the talk of Node came about. Mind you, I'm not a python developer and if someone's blog title doesn't grab my attention by having some connection to me, or what I do, I'll probably just skip over it.

twisted - "A completely different set of batteries included."

I have deployed services using both twisted and node - some off the cuff points:

- Twisted is large, and includes many new concepts and vocabulary, with somewhat patchy documentation. There is a big hump to climb over before being productive. I was pretty much there with node on one 35 minute train ride.

- The twisted async. mantra only flies within the (albeit large) twisted cloud of classes. I often find myself deferring to threads etc. for synchronous file IO etc.

- Writing plugins for node is very approachable (including things that interact with the event loop). I use ctypes + .so for the same work in python land, but it took some experimentation and discovery (albeit not very difficult) to arrive at a good pattern for this.

Once you understand it - twisted is an enormously powerful resource, and I am still writing complex services using it. Node gets used for wrapping up computation services.

From my point of view, it's down to a combination of good marketing and 'right place at the right time'.

I've never heard of twisted - but I feel like I'm getting in on the ground floor with node. Additionally, I was positively salivating to learn a new language when it started 'emerging'.

I think part of it comes down to the fact that I was already very comfortable with Javascript, so I started with node.js knowing that I at least knew some of the basics ... and thank got I did, because programming in node is very different from what I'm used to.

It's sometimes difficult to know which lines of code are blocking and which aren't.