Feeds

The Node Ahead: JavaScript leaps from browser into future

Google V8 engine spawns server world doppelgänger

Remote control for virtualized desktops

Would you like to touch my V8?

Ryan Dahl set out to build his JavaScript platform atop Mozilla's SpiderMonkey, the engine at the heart of Firefox. But after about two days, he switched to Google's V8, and that's where he stayed. "V8 is just a nice, clean library," Dahl says. "It's compact and extracted away from Chrome. It's distributed as its own package, and it's easy to build and it's got a nice header file with nice documentation. It's kind of constrained. It doesn't have dependancies on other things. It seemed much more modern than the Mozilla stuff."

Google isn't officially involved in the project, but according to Dahl and other Node developers, the company has been helpful when the project requires V8 bug-fixes or additional insight. "It's an exciting project. I was at the jsconf.eu conference in Berlin last year, and there was a lot of buzz around Node," Google V8 team member Erik Corry tells The Reg. "It's a very cool use of V8 and shows what you can do when you combine open source software in new ways, not necessarily anticipated by the original authors."

Originally, Dahl called his project web.js. It was merely a webserver, an alternative to Apache and other "blocking" servers. But the project soon grew beyond his initial webserver library, expanding into a framework that could be used to build, well, almost anything. So he rechristened it node.js.

He released an early incarnation of the platform in June 2009, but few noticed until he gave a demo at that year's jsconf. His 45-minute talk was met with a standing ovation, and the project was off and running, not just among application developers but at big-name cloud outfits as well.

The demo

"[Ryan Dahl] was certainly ahead of the game in understanding the implications of [the real-time] world," says Alexis Richardson, senior director at VMware and the former CEO of Rabbit Technologies, the outfit behind RabbitMQ, who was reading Dahl's blog before Node was released. "When he introduced Node, I was extremely impressed."

A month later, Dahl was hired by Joyent.

Node in the heavens

Joyent had already explored the idea of using JavaScript on the server side, and Node seemed to fit right into its thinking. Dahl started writing code designed to drive Joyent's infrastructure cloud, and two years on, Node is "heavily used" inside the company's service. It's also a part of Joyent's SDC6 software, which allows ISPs and other outfits to build their own infrastructure clouds.

The company uses Node in tandem with RabbitMQ – an open source messaging platform for sending data across cloud services – and at VMware, Alexis Richardson and crew have built software that lets application developers do much the same thing. They call it rabbit.js.

RabbitMQ already integrates with Java, Ruby, and Python event-based systems – including Spring Integration, EventMachine, and Twisted – and Node was the natural next step. "The combination of Node with Rabbit simplifies the motion of the data. Rabbit is a data-in-motion technology as opposed to storage technology like a database, and Node gives you a handy toolkit for interfacing that world with applications," Richardson says. "Rabbit enables the motion of the data. What Node does is provide a way to program in this style, for JavaScript users."

At the same time, rabbit.js builds on Socket I/O, a Node technology for readily pushing data to client browsers. Designed by LearnBoost CTO Guillermo Rauch, Socket I/O gives developers a single interface for pushing information to WebSocket-enabled browsers as well as browsers that don't support the relatively new push standard.

"Socket I/O gives you a duplex channel, but what it doesn't do is define what you might say or hear over that channel," says VMware staff engineer Michael Bridgen, who built rabbit.js. "RabbitMQ has semantics about how you do messaging, so I thought [the combination of RabbitMQ and node] might be a sweet spot."

The idea is to extend messaging from the cloud to the browser. On the back end, RabbitMQ lets developers pass data without a database. With rabbit.js and Socket I/O, Bridgen and VMware can do much the same when an application is talking to the client, across the web. This is just the sort of thing Node is designed to do.

Node Knockout

Node Knockout

"I think Node itself recognizes that web programming is more about network programming than it is about databases," Bridgen says. "It's about taking on some data, sending it on in that direction, and then something comes back and sending that back on again. It's about shuffling data here and there. One of the reasons that Node has been successful is that it makes that kind of asynchronous data shuffling accessible to people by couching it in JavaScript."

Rauch agrees. Node drives the length and breath of his LearnBoost app. With node, he says, you can use the same language on the front end and the back end. "That's what's so appealing," he says. "You can write your web application in JavaScript, and you can write all your back-end infrastructure in JavaScript, and you can write your client web application in JavaScript. It really is a single-stack world."

Remote control for virtualized desktops

More from The Register

next story
PEAK APPLE: iOS 8 is least popular Cupertino mobile OS in all of HUMAN HISTORY
'Nerd release' finally staggers past 50 per cent adoption
Microsoft to bake Skype into IE, without plugins
Redmond thinks the Object Real-Time Communications API for WebRTC is ready to roll
Microsoft promises Windows 10 will mean two-factor auth for all
Sneak peek at security features Redmond's baking into new OS
Mozilla: Spidermonkey ATE Apple's JavaScriptCore, THRASHED Google V8
Moz man claims the win on rivals' own benchmarks
FTDI yanks chip-bricking driver from Windows Update, vows to fight on
Next driver to battle fake chips with 'non-invasive' methods
DEATH by PowerPoint: Microsoft warns of 0-day attack hidden in slides
Might put out patch in update, might chuck it out sooner
Ubuntu 14.10 tries pulling a Steve Ballmer on cloudy offerings
Oi, Windows, centOS and openSUSE – behave, we're all friends here
Was ist das? Eine neue Suse Linux Enterprise? Ausgezeichnet!
Version 12 first major-number Suse release since 2009
prev story

Whitepapers

Cloud and hybrid-cloud data protection for VMware
Learn how quick and easy it is to configure backups and perform restores for VMware environments.
Forging a new future with identity relationship management
Learn about ForgeRock's next generation IRM platform and how it is designed to empower CEOS's and enterprises to engage with consumers.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?
New hybrid storage solutions
Tackling data challenges through emerging hybrid storage solutions that enable optimum database performance whilst managing costs and increasingly large data stores.
Security and trust: The backbone of doing business over the internet
Explores the current state of website security and the contributions Symantec is making to help organizations protect critical data and build trust with customers.