Google Native Client

Google announced something very interesting yesterday: their Native Client project.

The short form of what this does: You can develop part or all of your application client in a language that compiles down to native code (for instance, C or C++, compiled to x86 assembly), then let the user run it in their browser, in a semi-sandboxed environment that theoretically prevents malicious code from being executed.

Why would you want to do this? Because developing complex applications in JavaScript is a pain, and all of the other options (Java in a browser, Adobe Flex, Microsoft Silverlight) provide only a subset of functionality, and are slower than native applications. That’s one of the reasons that most applications are still done for the desktop.

It’s an ambitious project, not to mention one that is probably making every black-hat hacker on the planet drool right now. The security challenges inherent in this are enormous.

Adobe has previously had a similar thought, in the form of Alchemy, a labs project for a C/C++ compiler that generates code for AVM2 (the virtual machine inside the Flash player). But Google takes the idea all the way down to true native code.

The broader trend has been towards managed code environments and just-in-time compilers (JITs). But the idea of native code with managed-code-like protections is certainly extremely interesting, and the techniques developed will likely be interesting in the broader context of malware prevention in non-browser applications, too.

And while we’re talking about lower-level application infrastructure pies that Google has its fingers in, it’s worth noting that Google has also exhibited significant interest in LLVM (which stands for Low-Level Virtual Machine). LLVM is an open-source project now sponsored by Apple, who hired its developer and is now using it within MacOS X. In layman’s terms, LLVM makes it easier for developers to write new programming languages, and makes it possible to develop composite applications using multiple programming languages. A compiler or interpreter developer can generate LLVM instructions rather than compiling to native code, then let LLVM take care of dealing with the back-end, the final stage of getting it to run natively. But LLVM also makes it easier to do analysis of code, something that is going to be critical if Google’s efforts with Native Client are to succeed. I am somewhat curious if Google’s interests intersect here, or if they’re entirely unrelated (not all that uncommon in Google’s chaotic universe).

Bookmark and Share

Posted on December 10, 2008, in Applications and tagged , , . Bookmark the permalink. 5 Comments.

  1. I couldn’t agree more great stuff here.

    Like

  2. Hi, I found this article while searching for help with Microsoft Silverlight. I have recently changed browsers from Chrome to Firefox 3.2. Now I seem to have a problem with loading sites that use Microsoft Silverlight. Everytime I go on a page that needs Microsoft Silverlight, the site crashes and I get a “npctrl.dll” error. I can’t seem to find out how to fix it. Any aid getting Microsoft Silverlight to function is very appreciated! Thanks

    Like

  3. Now I am ready to do my breakfast, after having my breakfast coming over again to read
    other news.

    Like

  4. I appreciate, result in I discovered just what I used to be looking for.
    You have ended my four day lengthy hunt! God Bless you man. Have
    a great day. Bye

    Like

Leave a comment