Feeds

Mozilla slips SpiderMonkey into Dev Platform of the Future™

Climbs on servers, aims war cry at Google

Secure remote control for conventional and virtual desktops

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

The essential guide to IT transformation

More from The Register

next story
The Return of BSOD: Does ANYONE trust Microsoft patches?
Sysadmins, you're either fighting fires or seen as incompetents now
Munich considers dumping Linux for ... GULP ... Windows!
Give a penguinista a hug, the Outlook's not good for open source's poster child
Intel's Raspberry Pi rival Galileo can now run Windows
Behold the Internet of Things. Wintel Things
Linux Foundation says many Linux admins and engineers are certifiable
Floats exam program to help IT employers lock up talent
Microsoft cries UNINSTALL in the wake of Blue Screens of Death™
Cache crash causes contained choloric calamity
Eat up Martha! Microsoft slings handwriting recog into OneNote on Android
Freehand input on non-Windows kit for the first time
Linux kernel devs made to finger their dongles before contributing code
Two-factor auth enabled for Kernel.org repositories
prev story

Whitepapers

Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Top 10 endpoint backup mistakes
Avoid the ten endpoint backup mistakes to ensure that your critical corporate data is protected and end user productivity is improved.
Top 8 considerations to enable and simplify mobility
In this whitepaper learn how to successfully add mobile capabilities simply and cost effectively.
Rethinking backup and recovery in the modern data center
Combining intelligence, operational analytics, and automation to enable efficient, data-driven IT organizations using the HP ABR approach.
Reg Reader Research: SaaS based Email and Office Productivity Tools
Read this Reg reader report which provides advice and guidance for SMBs towards the use of SaaS based email and Office productivity tools.