Mojo <-> NaCL

46 views
Skip to first unread message

dsk...@google.com

unread,
Jun 30, 2016, 4:59:09 PM6/30/16
to mojo-dev
Hi guys,

I'm working on optimizing memory usage for the browser process, but I enjoy thinking about global once-and-for-all solutions. Lately I've been thinking: can we compile some Mojoified components as NaCL code, run them in NaCL sandboxes, and kill those sandboxes on low-memory conditions? (So sandboxes will serve as cheap processes.)

I guess Mojo-wise there shouldn't be any problem talking with a component inside NaCL? And handling a situation where it suddenly dies?

Ken Rockot

unread,
Jun 30, 2016, 5:10:55 PM6/30/16
to Dmitry Skiba, chromium-mojo
-mojo-dev +chromium-mojo

Darin Fisher

unread,
Jun 30, 2016, 5:11:21 PM6/30/16
to Dmitry Skiba, chromium-mojo
bcc:mojo-dev, +chromium-mojo

We don't need to rely on NaCl here. This can be done with ordinary OS processes as well. NaCl is just about adding security and, in the case of PNaCl, portability. (With NaCl, there is the issue that it doesn't work on Android.)

The main challenge with killing Mojo modules is that you have to make sure the clients depending on those Mojo modules are prepared to deal with the Mojo modules going away suddenly. The clients will observe an interrupted connection, and they would need to know how to handle that.

Mojo doesn't completely solve this problem, but it does provide a framework for doing the kind of thing you describe.

-Darin

On Thu, Jun 30, 2016 at 1:59 PM, dskiba via mojo-dev <mojo...@chromium.org> wrote:
Reply all
Reply to author
Forward
0 new messages