Native Client (Google's NaCl)
Home › Forums › Platform specific › Native Client (Google's NaCl)
This topic has 5 voices, contains 19 replies, and was last updated by
Sverre Lunøe-Nielsen 207 days ago.
| Author | Posts |
|---|---|
| Author | Posts |
| August 22, 2011 at 22:31 #635 | |
|
Sverre Lunøe-Nielsen |
Google’s Native Client technology makes it possible to run compiled code in Chrome in a secure way. http://code.google.com/chrome/nativeclient/ Recently, the SDK reached v0.5 and the ABI has now been frozen. OpenGL is still experimental, but will be included in the near future. Discussion fora across the web all have nay-sayers who compare this to ActiveX, but for Old Grumpy Men who hate JavaScript and garbage collection, it’s a thing of joy. Demo platform? |
| August 23, 2011 at 14:09 #675 | |
|
Jake Taylor |
I had an interesting discussion with someone a few days ago and he said something along the lines of, “Today’s marketplace needs exponential growth to survive financially. High-end platforms have began to fail in this area, so solutions to new problems need to be scalable downwards to accomodate for lower-end platforms.” In the context of this post, I think that web platforms will become a nice showcase for demo-like stuff in the near future. Once it becomes more accessible, we’ll have demos that while not quite keeping up in technical regards with PC demos nowadays, could possibly start emulating the style and flair of demos that were popular in the late 90′s/early 2000′s. With similar platform capabilities, I think we’ll see some really kickass web stuff in the next couple of years. </rant> :) |
| August 23, 2011 at 15:00 #677 | |
|
Bent Stamnes |
Jake: the belief that web platforms is the future of the demo scene is one of the reasons this site exists, btw. |
| August 23, 2011 at 15:30 #679 | |
|
Jake Taylor |
As it should be :) |
| August 23, 2011 at 15:42 #680 | |
|
niels |
For starters it’s not hard to surpass ActiveX in terms of developer-friendliness and I’m sure that Google does a good job at integrating native processes into their browser. Even though the use of this and plugins is usually restricted to major technologies (Flash), business solutions and (a lot of) niches, it’s important for any allround browser to offer. Having said that I do believe that the vast majority of developers interested in delivering their demoscene or other visual artistry through web content will still be using widely supported integrated technologies such as JS/WebGL, and rightfully so. If one would want to make a native demo, just deliver the executable already. I could be overlooking some major cool features of NC here, but most likely not :) That, again, doesn’t mean that I hope and somewhat trust Google to deliver something far more robust than ActiveX ever was/is. It is cute to have your object spinning in a browser though, but I did that 12 years ago and that was enough :) I’d love to give WebGL a shot one day though.
|
| August 24, 2011 at 09:39 #738 | |
|
Erik "kusma" Faye-Lund |
Considering that any fragment shader that contains an infinite loop can deadlock my machine, I’m still far from at the point where I’d want random Joe Schmoe to be able to feed OpenGL commands to my machine over the interwebs. This is a problem both for NaCl (if OpenGL gets included) and WebGL. The reason is that security hasn’t traditionally been a big focus in desktop graphics driver development.
|
| August 24, 2011 at 10:09 #740 | |
|
niels |
Haha for real? :) That might be something “to fix” in the drivers then. |
| August 24, 2011 at 10:57 #742 | |
|
Erik "kusma" Faye-Lund |
Niels: Sure, just try this fragment program:
If I leave the “inc” uniform at the default value of 0, this hangs my GPU. Luckily, loops that cannot be statically unrolled is illegal in ESSL, which is the shading language used in OpenGL ES 2.0 (and hence also WebGL), so this particular shader is invalid. But Firefox has a setting “webgl.prefer-native-gl” which as far as I understand feeds code directly to the target GLSL-compiler when enabled. And I’ve seen WebGL evangelists out there encourage people to set it to true.
|
| August 24, 2011 at 12:13 #743 | |
|
niels |
Well it’s good to hear that ESSL isn’t prone to this particular pitfall — on the other hand it worries me that Firefox exposes such a setting. I can halfway understand why people would like to experiment with such a feature, I can get why “evangelists” who clearly overlook security as a whole praise it, but browser/technology developers really shouldn’t open any backdoors to native subsystems. For obvious reasons. As for this native client, I just hope that such content will remain fully transparent to the user i.e. allow permission prior to running native code, no matter how well-secured the sandbox environment is. |
| August 24, 2011 at 12:34 #745 | |
|
Erik "kusma" Faye-Lund |
Actually, ESSL allows dynamic flow control in the vertex shader, where this issue might also be present. But I haven’t really tested that, and I don’t feel like a potential reboot right now ;)
|
| August 24, 2011 at 23:07 #789 | |
|
Sverre Lunøe-Nielsen |
niels: NaCl is for Chrome only at the moment, and will most probably stay that way for a long while. But it is integrated in that browser. So there is no “click me to accept this plugin at your own risk”. Loading is as fluent as JavaScript. As I see it, the only comparison with ActiveX is that both technologies run natively compiled code. The advantage over a standalone is of course that you can target Max, Linux, Windows (and Android when PNaCl comes along) with no extra effort. Releasing a standalone native executable limits most people to one of these OSes. I don’t think I have seen one non-stuttering JavaScript / WebGL demo that did more than pure GPU rendering. With native code, this all could change (hopefully!)
|
| August 25, 2011 at 01:56 #879 | |
|
niels |
The abstraction that allows it to run in a Chrome browser on multiple platforms does not deduct from the fact that it is still native code. And the fact that Chrome loads and runs this instantaneously without notice scares me even more. Seems like they’re really confident. That said, a demo running native code *and* hardware shaders is no longer a web-platform demo. It’s a native process hosted (and shielded) by a browser, not much different from a straight executable at all. If JavaScript/WebGL is giving you a raw deal, performance-wise, then perhaps it’s time to consider if you’re using the right technology for the job :) Well okay, you get free Mac and Unix (or whatever your main OS is) as long as you target x86/x64 hardware. I just don’t see why browser vendors need to keep beating this dead horse over and over again. They’d better spend even more effort on getting widely supported higher level technology faster and better. |
| August 25, 2011 at 07:38 #983 | |
|
Sverre Lunøe-Nielsen |
What do you mean? Consider not using computers for graphics?
|
| August 25, 2011 at 11:18 #1008 | |
|
niels |
Now that’s stretching things out of proportion? Just saying that there are more suitable tools if JS can’t give you the performance you need. And I also said that I really don’t think a demo is “webbased” anymore as soon as it uses a native process to do the thinking and the graphics card for the rest. Then again competitions will probably be unified pretty soon, as far as that isn’t the case already. For as far as it wasn’t very clear, I’m just not a fan of everyone and their brother writing native code to run in my browser :) Lets just stick to some standards and make that work instead. I am a hypocrit though because I don’t enjoy coding JS and the likes and I already downloaded the SDK :) |
| August 25, 2011 at 11:25 #1009 | |
|
Erik "kusma" Faye-Lund |
niels: If you don’t want native code to be run in your browser, then NaCl isn’t for you. But that should kind of be given already from reading the name, shouldn’t it? Keep in mind that NaCl code DOES run in a sandbox. I don’t think that poses any security issues itself compared to interpreted code; security bugs are security bugs no matter if they are in a sandbox or in an interpreter. |
You must be logged in to reply to this topic.



Latest comments