Feeds

Mozilla slips SpiderMonkey into Dev Platform of the Future™

Climbs on servers, aims war cry at Google

High performance access to file storage

Mozilla is building its own version of Node.js – the increasingly popular open source platform for coding server-side applications with JavaScript – moving Node from Google's V8 JavaScript engine to its own SpiderMonkey engine.

"We think V8 is great and the fact that Node has become so widely used is a testament to that. But we also think there’s room for competition here. Browser-based competition is old-hat. Let’s move this battle to the servers," Mozilla man Paul O'Shannessy wrote in a recent blog post.

V8 is the JavaScript engine included with Google's Chrome browser, while SpiderMonkey helps drive Firefox. But the idea here is to transplant the JavaScript language from the client to put it on the server, letting you build the back end of an application in much the same way you build a JavaScript front end.

Though O'Shannessy and his collaborators aim to provide a SpiderMonkied version of Node, they aren't replacing V8 entirely. They've chosen a hybrid approach, implementing the V8 API on top of SpiderMonkey. "We realized that Node was tied pretty closely to V8, and there really wouldn’t be any way to use SpiderMonkey without ripping Node apart and rebuilding it. Not only would that suck now, but it would likely suck long into the future as Node gets updated. This port would fall behind and nobody wants that," he writes.

With his hybrid “V8Monkey” engine, O'Shannessy and his collaborators can simply plug their work into the existing Node platform. He calls his new version of the platform "SpiderNode," and preliminary code is already available on github. There's also a repository for the standalone V8Monkey implementation.

Node.js – the current darling of the Silicon Valley developerati – is an "event-driven" system meant for networking applications that involve heavy I/O. In essence, it doesn't wait for one thing to happen before moving to the next. Its "event loop" needn't preallocate large chucks of memory when a user connects from across the interwebs. It can allocate a small slice of memory that identifies the connection, and then it will use additional memory as needed.

The platform was originally built by an independent developer named Ryan Dahl, who's now on staff at San Francisco-based cloud-computing outfit Joyent. Node underpins Joyent's Amazon-like "infrastructure cloud", and the company has become the open source project's chief steward.

Dahl originally set out to build Node atop Mozilla's SpiderMonkey – the JavaScript engine included with Firefox browser – but this effort didn't last long. After about two days, he switched to Google's V8. "V8 is just a nice, clean library," Dahl told us earlier this year. "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 dependencies on other things. It seemed much more modern than the Mozilla stuff."

But clearly, O'Shannessy sees things differently. And he says there are some tangential benefits of his V8Monkey engine. "The JS team at Mozilla is also really interested in just having this API around. It has potential for other projects like this, but also raises awareness of API differences and might help push forward changes to the SpiderMonkey API," he says. According to O'Shannessy, the project has already sparked discussion about moving the SpiderMonkey API from C to C++.

But the main idea is to provide an alternative version of Node. ®

High performance access to file storage

More from The Register

next story
Android engineer: We DIDN'T copy Apple OR follow Samsung's orders
Veep testifies for Samsung during Apple patent trial
Microsoft: Windows version you probably haven't upgraded to yet is ALREADY OBSOLETE
Pre-Update versions of Windows 8.1 will no longer support patches
OpenSSL Heartbleed: Bloody nose for open-source bleeding hearts
Bloke behind the cockup says not enough people are helping crucial crypto project
Half of Twitter's 'active users' are SILENT STALKERS
Nearly 50% have NEVER tweeted a word
Windows XP still has 27 per cent market share on its deathbed
Windows 7 making some gains on XP Death Day
Internet-of-stuff startup dumps NoSQL for ... SQL?
NoSQL taste great at first but lacks proper nutrients, says startup cloud whiz
US taxman blows Win XP deadline, must now spend millions on custom support
Gov't IT likened to 'a Model T with a lot of things on top of it'
Microsoft TIER SMEAR changes app prices whether devs ask or not
Some go up, some go down, Redmond goes silent
prev story

Whitepapers

Mainstay ROI - Does application security pay?
In this whitepaper learn how you and your enterprise might benefit from better software security.
Five 3D headsets to be won!
We were so impressed by the Durovis Dive headset we’ve asked the company to give some away to Reg readers.
3 Big data security analytics techniques
Applying these Big Data security analytics techniques can help you make your business safer by detecting attacks early, before significant damage is done.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
Mobile application security study
Download this report to see the alarming realities regarding the sheer number of applications vulnerable to attack, as well as the most common and easily addressable vulnerability errors.