Feeds

Mozilla slips SpiderMonkey into Dev Platform of the Future™

Climbs on servers, aims war cry at Google

Business security measures using SSL

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

New hybrid storage solutions

More from The Register

next story
'Windows 9' LEAK: Microsoft's playing catchup with Linux
Multiple desktops and live tiles in restored Start button star in new vids
Not appy with your Chromebook? Well now it can run Android apps
Google offers beta of tricky OS-inside-OS tech
New 'Cosmos' browser surfs the net by TXT alone
No data plan? No WiFi? No worries ... except sluggish download speed
iOS 8 release: WebGL now runs everywhere. Hurrah for 3D graphics!
HTML 5's pretty neat ... when your browser supports it
Greater dev access to iOS 8 will put us AT RISK from HACKERS
Knocking holes in Apple's walled garden could backfire, says securo-chap
NHS grows a NoSQL backbone and rips out its Oracle Spine
Open source? In the government? Ha ha! What, wait ...?
Google extends app refund window to two hours
You now have 120 minutes to finish that game instead of 15
Intel: Hey, enterprises, drop everything and DO HADOOP
Big Data analytics projected to run on more servers than any other app
SUSE Linux owner Attachmate gobbled by Micro Focus for $2.3bn
Merger will lead to mainframe and COBOL powerhouse
prev story

Whitepapers

Providing a secure and efficient Helpdesk
A single remote control platform for user support is be key to providing an efficient helpdesk. Retain full control over the way in which screen and keystroke data is transmitted.
WIN a very cool portable ZX Spectrum
Win a one-off portable Spectrum built by legendary hardware hacker Ben Heck
Storage capacity and performance optimization at Mizuno USA
Mizuno USA turn to Tegile storage technology to solve both their SAN and backup issues.
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?
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.