Google’s Native Client (NaCl) is a browser technology to deliver native x86 binaries to users on Windows, Mac and Linux. Whilst this bridges the gap between modern JavaScript speeds and native binaries, portability is limited and that’s especially important on the web where there’s greater device diversity than on the desktop. Google are announcing that NaCl now also supports x86-64 and ARM. In addition to this Google are also announcing the ANGLE project, an open source compatibility layer to map WebGL (OpenGL ES for the web) to DirectX calls for Windows systems without an OpenGL library.
Whilst JavaScript engines have been getting much quicker over recent years (with IE9 joining the fray), there are some things where absolute speed is essential and the web just won’t cut it. Portability is the web’s greatest asset and cementing a web littered with x86 only binaries won’t do for Android sales.
Interestingly, to take things beyond jut x86, Google are making use of LLVM (a bytecode compiler that spits out highly optimised binaries, developed largely by Apple for on-demand GPU shader compilation in Leopard and eventually to replace GCC outright) to create highly portable bytecode binaries in a Java / .NET fashion.
Another emerging technology is WebGL. Essentially “OpenGL for the web†both Firefox and WebKit nightlies offer experimental support. WebGL allows JavaScript to have access to the 3D capabilities of your GPU, it is expected that games of iPhone-esque quality will be possible in your browser.
On a certain operating system that has a competing 3D graphics API, the OpenGL libraries may not always be present and this means that WebGL content will not be available to these users. To solve this Google have partnered with TransGaming (makers of the Cider compatibility layer that allows easy porting of DirectX games to Mac, so named because of its roots in Wine) to produce an open source project (BSD licence) called ANGLE (“Almost Native Graphics Layer Engineâ€) to translate OpenGL ES 2.0 to DirectX.
What’s most interesting about both of these announcements is the difference it shows in company tactics between Google, Apple and Microsoft. Google don’t care what device you use to access the Internet as long as you’re using Google and the experience is fast. NaCl helps push us more to the web, filling in gaps where JavaScript alone won’t suffice. If you can push a native binary to a user over a URL, then why can’t you do video editing on the web? The code is native, it’s running as fast as a program you install traditionally; so what’s the hang-up?
With Apple, NaCl represents a threat to their walled app store, necessary to drive iPhone sales. If native apps can be delivered by URL, why would any developer want to put up with the insane app store restrictions where they can’t even communicate with their own customers? If lots of developers are delivering compelling content using NaCl on desktops and on non-iPhones, and Apple don’t support NaCl, then users might consider an Android phone over an iPhone. It’s one long-term possibility, certainly.
With Microsoft, ANGLE represents a threat to their single-vendor ecosystem that encourages developers to learn and use only DirectX, to drive sales of Windows, XBoxes and Windows phones. Microsoft’s plate of offerings to developers is that if they come and learn C# they can target the XBox, Windows (and Mac/Linux via Silverlight) and Windows Phone 7 Serieses using just one codebase. They promise to make developing easy if you stick to them. WebGL is not DirectX and you will not see WebGL in IE9, or any version of IE because Microsoft do not want developers learning a competing graphics API and they do not want to legitimise the use of OpenGL as the standard on the web. It would be devastating in the long term to Microsoft’s iron grip on the gaming market. If a generation of kids are growing up writing games in WebGL, they’re naturally going to be armed to write full games in OpenGL, and not DirectX.
In the end, both Apple and Microsoft have bottom lines (hardware sales) that will be compromised by certain emerging web technologies. The self-crippling they may go through trying to not compromise themselves (Intel Atom, anybody?) may lead to Google getting the upper hand. That is, if Apple and Microsoft can’t invent a technology that threatens Google’s 97% income through online advertisements.
and especially Apple for all the heavy lifting of Clang and even LLVM with major contributors:
http://llvm.org/devmtg/2009-10/
Sure, maybe they should do that. But then again they probably owe a lot more of their success to GCC than to LLVM and they don’t contribute a lot to GCC either.
Hell, even Apple owes a lot to GCC.
That is the beauty of FOSS anybody can profit from it even without giving back anything.
And calling the LLVM stuff bytecode may be correct in a way, but LLVM is really LL low level, much more so than the JVM. It is more like assembly for a fairly generic CPU that maps well to real CPUs, isn’t it?
Such as… including a powerful Ad-Blocker in Internet Explorer and Safari?
Apple haven’t done this because it would sour their relationship with Google, which they ship as default on the iPhone and Safari–though Apple are doing plenty besides to sour that relationship anyway.
Microsoft haven’t done that because it would be called anti-competitive, effectively killing the advertising market since IE holds such a high share. As far as I’m aware, only Camino ships an ad blocker by default.
Apple are doing plenty to kill the advertising market (at least the non-Google part of it) by keeping Flash off the menu.
There’s no easy way to compete with Google. They’re device and platform agnostic. All Microsoft can do is force people to use Bing, and all Apple can do is downplay the web by use of the App Store.
That shouldn’t make much difference as many sites will just switch to a JPEG or GIF in the absence of Flash
Do they mean to imply that their technology is the Salt of the Internet?
LLVM should be the way to go for every platform. It’s not there yet but it should be able to provide a bytecode (to which C/C++ or any other LLVN language can be compiled to) that then will be converted to native in every platform. That would be an enormous boost to google’s cause because it will be able to provide the endless amount of existing C/C++ apps as a web service.
Oh I misread the link.. they ARE doing that!
Awesome! That truly has the potential to change the world, and would make chrome OS make a lot more sense.
for obvious reasons.
Gaming– at least so-called ‘casual’ gaming– is moving more and more to the web. Casual gaming especially is usually designed to be cross-platform, and this would simply improve the possibilities.
If Apple and Microsoft want to suck lemons about it, I guess they will, but this should be exciting to most any up-and-coming game developer that simply wants their game to be seen. Gaming has already been so hamstrung by DirectX and I really do think this will accommodate the future direction it is taking. (Well, I’ll admit my selfish bias and say it offers me more accessibility as a GNU/Linux user.)
What about Unity3D (community favorite) and old Flash 3D, like PaperVision3D?
Unity is very popular w/ the community, runs on browsers, Wii, Ps3, iPhone, etc.
Flash… has something to say in 3D, lots of 3D usage for ads, etc.
I have, but its in mono so C# and .net languages. on the plus side, unity pro allows Objective C, and C++ extentions! so openGL there right?