[Sugar-devel] Prototype python <-> js IPC

Daniel Narvaez dwnarvaez at gmail.com
Thu Apr 25 20:36:14 EDT 2013


On 26 April 2013 00:54, Daniel Drake <dsd at laptop.org> wrote:

> On Thu, Apr 25, 2013 at 3:59 PM, Daniel Narvaez <dwnarvaez at gmail.com>
> wrote:
> > Hello,
> >
> > I wrote a quick prototype for a possible python <-> js IPC.
>
> I am missing some background here. In what cases do we need such IPC?
>
> The two cases that spring to mind are journal and collaboration.
>
>
Those are the two main cases I have in mind. There might also be smaller
stuff like being able to get the xo color setting.


> > I think in an ideal world the javascript code would communicate directly
> > with system services.
>
> I agree. To me, gobject-introspectionis the obvious choice here, and
> it can be used from javascript (in some form at least). How hard would
> it be to make it available here?
>

Using an extension, it might be possible to run a seed context (
https://live.gnome.org/Seed) inside the web content process and then have
the web context communicate with it through postMessage. Chrome is doing
something similar with extensions/context scripts. I'm not sure how well
exchanging binary streams would work with that approach (it's going to be
important both for datastore and collaboration).

In theory, since they use the same javascript interpreter, using seed it
might even be possible to give access to gobject-introspection (or part of
it) directly from the web context. Though that starts to feel messy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20130426/3a039ff1/attachment-0001.html>


More information about the Sugar-devel mailing list