-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use MessagePort for direct connections between modules #254
Comments
firefox explicitly says they don't support this in web workers, so support On Wed, Apr 8, 2015 at 8:39 AM, Benjamin M. Schwartz <
|
I guess @willscott I seem to remember |
Looks to me like the Firefox way to do this might be SharedWorker. |
Also looks to me like they are planning to support it in the future, which would be cool. @trevj The important thing freedom channels (that I think you're referring to) give us, at the moment, is that they support avoiding the child-parent freedom message bouncing which otherwise happens when a child module is passing a message to the core environment (without channels they bounce through the parent module - via freedom core env!). Would be good to have a design doc on channels in freedom so we can review how they work and make sure the they have nice syntax for usage too; I imagine freedom channels could nicely abstract over the mechanism of inter-module communication (MessagePort, or freedom-core env bounced messages). |
The only reference I see to "freedom channels" is #48, which is a bit old and vague. It would definitely be nice to clear up some of these proposals. |
@soycode something fun to think about after firefox testing :) |
It would also be a trivial piece of code if we could somehow just insert it in the core context. |
Currently, all inter-module messaging passes through the core environment. This effectively requires all message passing to acquire and release a single lock (i.e. the mainloop). This seems likely to create a performance bottleneck when transferring >1000 messages per second, as in uProxy. However, Web Workers are capable of connecting directly using a Transferable MessagePort, which would avoid the need to access the core environment when communicating between modules, and might alleviate this bottleneck.
The text was updated successfully, but these errors were encountered: