Feeds

Google defends native code Chrome play

'Don't ditch The Good for The Perfect'

Choosing a cloud hosting partner with confidence

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

Intelligent flash storage arrays

More from The Register

next story
Netscape Navigator - the browser that started it all - turns 20
It was 20 years ago today, Marc Andreeesen taught the band to play
Sway: Microsoft's new Office app doesn't have an Undo function
Content aggregation, meet the workplace ... oh
Sign off my IT project or I’ll PHONE your MUM
Honestly, it’s a piece of piss
Return of the Jedi – Apache reclaims web server crown
.london, .hamburg and .公司 - that's .com in Chinese - storm the web server charts
NetWare sales revive in China thanks to that man Snowden
If it ain't Microsoft, it's in fashion behind the Great Firewall
Chrome 38's new HTML tag support makes fatties FIT and SKINNIER
First browser to protect networks' bandwith using official spec
Admins! Never mind POODLE, there're NEW OpenSSL bugs to splat
Four new patches for open-source crypto libraries
prev story

Whitepapers

Forging a new future with identity relationship management
Learn about ForgeRock's next generation IRM platform and how it is designed to empower CEOS's and enterprises to engage with consumers.
Cloud and hybrid-cloud data protection for VMware
Learn how quick and easy it is to configure backups and perform restores for VMware environments.
Three 1TB solid state scorchers up for grabs
Big SSDs can be expensive but think big and think free because you could be the lucky winner of one of three 1TB Samsung SSD 840 EVO drives that we’re giving away worth over £300 apiece.
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.
Security for virtualized datacentres
Legacy security solutions are inefficient due to the architectural differences between physical and virtual environments.