Feeds

Google defends native code Chrome play

'Don't ditch The Good for The Perfect'

Secure remote control for conventional and virtual desktops

Google has defended its decision to run native code inside its Chrome browser, while calling its Native Client plug-in a "very important part" of the company's Chrome OS strategy.

In unveiling its Cr-48 beta Chrome OS machine on Tuesday in San Francisco, Google did not mention Native Client. But when we asked what role the plug-in would play in the company's all-web-all-the-time OS, Google engineering director Linus Upson made it quite clear that Native Client — aka NaCL — isn't just a side experiment.

"Native Client is a very important part of our [Chrome OS] strategy," Upson said. "While the [Chrome] team has made JavaScript tremendously faster over the last two years, there's a lot of applications out there that have existing audiences that are [written in native code, such as C and C++], and there are a few that are specialized applications that need every last bit of performance the hardware can offer. Native Client is a way of addressing both those issues."

Asked if a final version of Native Client would ship with the first Chrome OS netbooks, due in "mid-2011," Upson was non-committal. But he did say that Native Client was "pretty far along." And he said that the plug-in would be turned on in the stable version of the company's Chrome browser — the basis for Chrome OS — "early next year." And he pointed out that after you purchase a Chrome OS machine, Google will continually update the operating system with new tools via the net.

He said that eventually, "you'll be able to take existing seasoned [native code] and run it securely across all platforms, including Chrome OS." But by all platforms, he means all Chrome platforms. Native Client has not been adopted by any other major browser vendors, and some have questioned whether the plug-in undermines the movement towards applications based entirely on web standards.

Mozilla has said quite plainly that its browser will not run native code, and Opera is similarly down on the idea. "That's not something we're pursuing. We really believe in HTML, and this is where we want to focus," Mozilla vice president of products Jay Sullivan told The Reg this summer at a Silicon Valley conference dedicated to net infrastructure. "

But speaking with us on Tuesday, Google's Upson strongly defended the concept. The first thing he said was that Native Client is open source. "We don't want to do anything proprietary," he said. But then he moved on to meatier matters. Upson said the in his conversions with the likes of Opera and Mozila, those browser makers have been pleased with the way Native Client handles security, and he believes they will start using it to secure their own code.

Native Client is designed to ensure that each application module meets a set of structural criteria that allow it to dissemble instructions, and that it can't contain certain instruction sequences. "This framework aims to enable our runtime to detect and prevent potentially dangerous code from running and spreading," Google said when announcing Native Client.

Upson said that Google is using Native Client to help build Chrome itself. "We're starting to use Native Client internally in Chrome to help secure more and more of the browser. I wouldn't be surprised if more and more browser vendors do the same," he said. "What Native Client can do is to make it so that if you write a bug in your code — we all write bugs — it doesn't become a security vulnerability. It's an additional layer of security."

But what about using Native Client to run web applications? But about web standards? "When it comes to running programs over the web in Native Client, we're very sensitive to maintaining the qualities of the web that have made it so successful," Upson said. "One of those things is that you can write applications that can run on any computer. One of the reasons we haven't widely deployed Native Client so far is we're working on something called Portable Native Client, so you're not tied to any one particular instruction set, so people can build whole new CPUs, whole new chip architectures, and [applications] won't get tied to those."

Portable Native Client — aka PNaCl, pronounced "pinnacle" — is a means of distributing portable versions of Native Code executables across all processors. The idea is to compile C, C++, and other languages into the Low Level Virtual Machine (LLVM) bitcode format, which allows for client-side translation into the client's native instruction set.

OK. But for this to work across the web, other browser makers will still have to add the Native Client plug-in to their browsers. And it doesn't look like this will happen — at least not anytime soon. Portable or not, Native Client is not HTML, JavaScript, or CSS.

Opera chief standards officer Charles McCathieNevile argues that Native Client isn't a viable long-term technology because it runs counter to the web mission. One of the core notion of the web, MCathieNevile said, is to offer developers a relatively small set of tools they can use to build applications that run across as many machines as possible. If you native code into the mix, you lose the simplicity that comes from using a contained set of standards.

Mozilla argues that JavaScript is already approaching the speed of native code and that the gap is shirking rapidly.

Upson said he's sympathetic to such concerns. But he indicated that Google's main aim is to ensure that the web isn't dominated by proprietary technologies. "We don't want proprietary application platforms to take over [and this could happen if we] make the perfect the enemy of the good," he said. Presumably, "the perfect" is a world where applications are written in nothing but web standards, and "the good" is Native Client.

"We have a lot of C++ out there. We want to be able to use that without having to rewrite everything. Take a game that's already running on several platforms. You're not going to go and rewrite that in JavaScript. But what if you could very easily port that native code to the browser? We want to make that possible."

But unless the other browser-makers embrace the thing, you're only serving a portion of the web. ®

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
China hopes home-grown OS will oust Microsoft
Doesn't much like Apple or Google, either
Linux turns 23 and Linus Torvalds celebrates as only he can
No, not with swearing, but by controlling the release cycle
This is how I set about making a fortune with my own startup
Would you leave your well-paid job to chase your dream?
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.
5 things you didn’t know about cloud backup
IT departments are embracing cloud backup, but there’s a lot you need to know before choosing a service provider. Learn all the critical things you need to know.
Why and how to choose the right cloud vendor
The benefits of cloud-based storage in your processes. Eliminate onsite, disk-based backup and archiving in favor of cloud-based data protection.
Top 8 considerations to enable and simplify mobility
In this whitepaper learn how to successfully add mobile capabilities simply and cost effectively.
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?