Closed KesterTong closed 7 years ago
I'm actually not sure, and not the expert. I did get ZMQ ported to NaCl so that it can import, and in principle this could reduce some of the subclassing. Then again, since we have a different post/recv message system, I don't know how useful that would be.
FWIW, I've had outstanding CLs in naclports for a couple weeks now, which I hope to get committed as soon as I can find the tree in an open state.
This version of colaboratory is no longer supported, please switch to https://colab.research.google.com.
Note: this concerns code that will be committed to naclports, not this repo.
The current version of kernel.py is based on overriding certain classes defined by IPython. However, this is done in a very messy way that requires duplicating a lot of IPython code.
A much cleaner approach would be to subclass the IPython.kernel.zmq.Session and create alternative implementations of zmq.eventloop.zmqstream.ZMQStream and zmq.Socket.
@MatthewTurk You probably know more about zmq, while I'm more familiar with the IPython internals. What do the ZMQStream and zmq.Socket classes look like? Are they trivial to override or does their public interface include ZMQ specific things?