[IPython-dev] Python and Javascript

Matthias Bussonnier bussonniermatthias at gmail.com
Tue Aug 27 04:34:13 EDT 2013

I don't think you will be able to share memory unless you code your own browser. Usually for security reason, js process are sandboxed as much as possible. And the case where webpage and server are on the same machine is so rare that I doubt this is even an envisaged feature.

Envoyé de mon iPhone

Le 26 août 2013 à 21:50, Cyrille Rossant <cyrille.rossant at gmail.com> a écrit :

> Hi,
> Just an update about our investigation of a possible web backend for
> Vispy, notably for an integration in the IPython notebook. We've made
> some progress on this question during EuroSciPy. I also made a proof
> of concept during the sprint (see
> https://groups.google.com/forum/#!topic/vispy/16SO-JLVVII, BTW those
> interested in following this work can subscribe to this mailing list).
> Our conclusion is that there are multiple ways of making a web backend
> for an OpenGL-based Python visualization toolkit like Vispy. GL
> rendering can happen server-side (VNC-like approach, similar to the
> Matplotlib web backend), client-side (GL commands are streamed to the
> browser through WebSocket), or a standalone HTML page could be
> generated, containing all the visualization info and data. I think all
> approaches are complementary and would be possible in the IPython
> notebook.
> My experiment streams GL commands from Python to JS (using WebGL)
> through WebSocket and a basic JSON messaging protocol. NumPy arrays
> can be transferred with base64. This is likely to be fast in most
> situations, where the data are only transferred upon initialization.
> In other cases, with datasets containing millions of points and that
> need to be transferred often, it may be too slow (I think the
> bottleneck is base64 serialization/deserialization, and there's also
> the transfer through WebSocket).
> We're now investigating a possible binary protocol to avoid
> serialization of the data buffer. In addition, there might be a way of
> sharing a same data buffer in memory between a Python process and the
> web browser, although I've no idea how. I'll keep you in the loop
> (unless this is not the right place for that, in which case I'm sorry
> about the noise!).
> Cyrille
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev

More information about the IPython-dev mailing list