The Kernel’s technical editor sings Node.js’s praises as he discusses its place in the open source software revolution.
Alex Kavanagh does the happy dance through the office. “It works, it works,” he sings as he high-fives his colleagues. “This,” he declares triumphantly, “is why I love programming.”
Kavanagh has just compiled a relatively new piece of open-source software on his server and made it do his bidding. Standing on the shoulders of giants: this is the work of a modern hacker. The software he was using is only a few years old, but has blazed the classic path from obscurity to ubiquity.
Kavanagh is the co-founder of Usable, a three-man start-up that took part in the Ignite100 accelerator in the North East of England. The little piece of code he has just written will bring his web app alive with real-time notifications.
The man who had inadvertently made Alex’s day is Ryan Dahl. Alex and Ryan have never met. They’ve never even heard of each other. Dahl is the creator of Node.js and he too stands on the shoulders of giants.
Dahl took V8 and used it to build a web server called Node.js. The magic thing about Node is that it is “non-blocking”, which means you can fire multiple requests at it and, instead of queuing them all up and grinding to a halt, it handles multiple requests simultaneously.
It is also relatively simple to get started with, as he shows in this demo video recorded last February at a tech meet-up in San Francisco. Even novice developers should be able to work through the basic examples he gives.
Dahl is a witty uber-geek. He explains how Node works with a sense of humour. He also writes code live on screen – a high stakes technique not recommended for the average developer – and makes jokes about Windows. Merry mayhem breaks out momentarily when he creates a tiny chat room that the audience can interact with. And so Node.js hit the ground running with a charming introduction and a low barrier to entry.
The next ingredient in Node’s success is a global hackathon. The recipe for Node Knockout is as follows: take a generous pocketful of top-notch sponsors, stir in a great selection of prizes and sprinkle with a collection of famous hacker-judges.
Node.js is, of course, being developed on Github and, at the time of writing, has been forked by 1394 developers putting it just ahead of jQuery. Browser developments such as WebSockets make developing web apps powered by Node even easier and hosted services such as Pusher also contribute towards making real-time app development even more straightforward.
Inevitably, large internet companies have started to take notice. LinkedIn recently launched their HTML5 mobile web app which is powered entirely by Node. And of course, many start-ups that are trying to stay ahead of the curve – like Usable – are experimenting with it too.
Node is not brand new. Simon Willison described it back in 2009 as “the most exciting new project I’ve come across in quite a while.” But its rise to prominence will make it into the text-book of classic open-source success stories.
Software like Node.js, which inspired Alex Kavanagh to do his happy dance, is in the ascendant. It promises to play a vital part in education in the digital economy, too. Truly, this is a thrilling time to be a developer.