Google Working Toward "Write Once, Run Anywhere" Native Web Apps
Join the DZone community and get the full member experience.Join For Free
Perhaps one of the most ambitious projects in this field is Google's Native Client (NaCl) project, which runs directly on the operating system and leverages the hardware of various machines. Recently, Google announced a significant accomplishment in adding NaCl module support for 64-bit x86 and ARM processors (chips that are used in most of our current PCs and smartphones).
Google NaCl is still in the prototype stage with more significant features in the works along with PNaCl (Portable Native Client). The Portable NaCL variation, Google said, will be able to recognize a machine's hardware and run a Native Client application that is tailored to that machine. Developers will simply write one PNaCl module that can run on any processor or operating system (NaCl modules already support Windows, Mac, and Linux).
Portable Native Client splits the NaCl software execution into two parts to make it work on more processors. It allows the browser to translate the portable representation into native binary for any type of processor without accessing the source code of the program. The first step translates the developer's code into LLVM bitcode; a portable intermediate state. The second part of the process involves the specific NaCl modules for each specific processor architecture, which is detected by PNaCl. These modules then translate the bitcode into machine code for the correct architecture. This is also the stage in which security checks are run. Google is still trying to determine how much overhead is added by these translations and learning how to reduce it.
Google will have to convince users and browser makers to adopt this technology and it will have to show companies that NaCl is secure. Even if no one adopts it though, it will still be relevant because Google has already it built into Chrome, Chrome OS, and Android. Microsoft may not adopt Google's technology because of the benefits that NaCl would give to Google's App suite, making tools like Google Spreadsheet and Docs serious competitors for Excel and Word. In the future, Google may even want to standardize the specifications for Native Client and its Portable Native Client counterpart.
Opinions expressed by DZone contributors are their own.