I just came across Google Native Client
Now, it looks really interesting that they ported Quake to run on a Browser and you can run C++ code on a开发者_StackOverflow社区 browser to process things more quickly, but I am trying to understand, what is the practical usage of NaCl?
What is the vision behind this by Google? To run software as a service on their "cloud" OS..err browser?
For example: Run Photosphop CS 5 on your browser?!
Anything you can do with ActiveX, but far more secure.
Elaboration:
Google Native Client allows you to run machine code locally and natively, but sandboxed insofar as only allowing access to protected memory regions and disabling exploits in the machine code relating to processor errata (certain sequences of machine code operations which act strangely on particular processors). Additionally, certain APIs are available (such as OpenGL) and there is interprocess communication with Javascript running with the page, allowing webapps which have a fast, powerful native backend.
It would be quite difficult to use the Win32 API to generate any native windows or controls with Google Native Client, whereas it'd be probably a bit easier with ActiveX. However, ActiveX is generally used with things like "Quake Live" to provide a fast, native experience for the player, and additionally for Internet Explorer 'plug-ins' -- the Flash plug-in is ActiveX, for instance, and uses native code (i.e., the plugin is compiled to machine code).
精彩评论