Feeds

Mozilla slips SpiderMonkey into Dev Platform of the Future™

Climbs on servers, aims war cry at Google

Beginner's guide to SSL certificates

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

Secure remote control for conventional and virtual desktops

More from The Register

next story
Nexus 7 fandroids tell of salty taste after sucking on Google's Lollipop
Web giant looking into why version 5.0 of Android is crippling older slabs
Bada-Bing! Mozilla flips Firefox to YAHOO! for search
Microsoft system will be the default for browser in US until 2020
Be real, Apple: In-app goodie grab games AREN'T FREE – EU
Cupertino stands down after Euro legal threats
Download alert: Nearly ALL top 100 Android, iOS paid apps hacked
Attack of the Clones? Yeah, but much, much scarier – report
SLURP! Flick your TONGUE around our LOLLIPOP – Google
Android 5 is coming – IF you're lucky enough to have the right gadget
Microsoft: Your Linux Docker containers are now OURS to command
New tool lets admins wrangle Linux apps from Windows
prev story

Whitepapers

Why cloud backup?
Combining the latest advancements in disk-based backup with secure, integrated, cloud technologies offer organizations fast and assured recovery of their critical enterprise data.
A strategic approach to identity relationship management
ForgeRock commissioned Forrester to evaluate companies’ IAM practices and requirements when it comes to customer-facing scenarios versus employee-facing ones.
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?
Simplify SSL certificate management across the enterprise
Simple steps to take control of SSL across the enterprise, and recommendations for a management platform for full visibility and single-point of control for these Certificates.
Intelligent flash storage arrays
Tegile Intelligent Storage Arrays with IntelliFlash helps IT boost storage utilization and effciency while delivering unmatched storage savings and performance.