Mike.--
You received this message because you are subscribed to the Google Groups "Native-Client-Discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/native-client-discuss/-/3Fau7EpCFUEJ.
To post to this group, send email to native-cli...@googlegroups.com.
To unsubscribe from this group, send email to native-client-di...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/native-client-discuss?hl=en.
HIstorically all plugins use this model. Imagine if Flash or QuickTime
had to start another process for every time there was an instance on
the page. The Pepper version of Flash does this (it doesn't use Native
Client, as Bennet pointed out, NaCl doesn't support this yet).
Brett
HIstorically all plugins use this model. Imagine if Flash or QuickTime
had to start another process for every time there was an instance on
the page. The Pepper version of Flash does this (it doesn't use Native
Client, as Bennet pointed out, NaCl doesn't support this yet).Right. But to me this hardly seems the most common case for NaCl apps? The expectation, I assume, is that most of the time NaCl plugins will be providing the actual specific code someone wants to run and not an engine for running interpreted code/data, which is the only practical model for plugins currently. That seems like one of the major advantages of NaCl.However, if one was going to write an engine-type plugin and expect all the application code to remain in javascript or pre-built script or something, I can see how the multiple instances would be useful. But why is it the default API?
Was this type of use actually intended to be the main case? Because that's what the API is communicating, at least to me.
Mike.--
Hi there,Any news on this matter? Having a module handling several instances would actually be very useful for what I'm currently trying to do..
Cheers,Alexandre
On Sunday, April 22, 2012 8:02:44 PM UTC+2, Bennet Yee wrote:
currently each embed tag creates a new sel_ldr process, each with its own module which would get a single plugin instance. eventually, i think this might work differently, so that multiple embed tags can specify the same nmf (details unclear on how to specify distinct modules vs shared modules), so that multiple instances can be created in the same module. the first use case that comes to mind is where one might want to let the browser handle the layout of the page, but to have multiple rectangular regions being provided by the same module. that way, an application or game that want to have a control panel / status display separate from a main work / exterior-view region would be easier. because NaCl modules cannot communicate with each other except by routing messages through JavaScript -- which adds latency -- the ability to essentially have two plugin instances share an address space would remove a lot of overhead.
-bsy
On Sun, Apr 22, 2012 at 10:41 AM, Alan Wolfe <alan....@gmail.com> wrote:
how would you see the API working the other way, where the default usage was a single instance with the option to have multiple? If you have a good solution, i'd +1 it! (:
We as end users of course also have the option to do something like make a singleton and not have to deal with it in our day to day code.
I'm curious to see if anyone has a good answer to your question about practical uses of multiple instances. Maybe the thought is that you could make a "control" type thing that could occur once or multiple times on a page, and just by virtue of the API, it ought to just work for N instances?
On Sun, Apr 22, 2012 at 3:49 AM, Mike Acton <mac...@gmail.com> wrote:
What are some good, practical, non-contrived examples of needing multiple instances? It seems like it's actually expected to be the most common case since the default API is designed to force you to carry instance information around.I'd like to be clear about the benefits to understand the value of passing around instance information all throughout an application, and in particular down to all the lower level functions that might need to post messages, rather than assuming a single global.
To post to this group, send email to native-cli...@googlegroups.com.Mike.--
You received this message because you are subscribed to the Google Groups "Native-Client-Discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/native-client-discuss/-/3Fau7EpCFUEJ.
To unsubscribe from this group, send email to native-client-discuss+unsub...@googlegroups.com.
--To post to this group, send email to native-cli...@googlegroups.com.
You received this message because you are subscribed to the Google Groups "Native-Client-Discuss" group.
To unsubscribe from this group, send email to native-client-discuss+unsub...@googlegroups.com.
--
bennet s yee
i usually don't capitalize due to mild tendonitis
--
You received this message because you are subscribed to the Google Groups "Native-Client-Discuss" group.
To view this discussion on the web visit https://groups.google.com/d/msg/native-client-discuss/-/8GKqIOKI5b8J.