xeus icon indicating copy to clipboard operation
xeus copied to clipboard

Does xeus or one of its subprojects implement the jupyter client protocol?

Open shakfu opened this issue 3 years ago • 5 comments

Hi,

I’m working on a python3 interpreter plugin for MaxMSP (https://github.com/shakfu/py-js) implemented with the python c-api. While it works ok, one of the intractable problems is related to the proper unloading of c-extensions such as numpy. Basically I can use a c-extension but I have to restart the host application if I call Py_FinalizeEx(). I think this is almost a deal-breaker for some.

Thinking how Jupyter solves these issues, I’ve been considering whether it would be possible to implement a very basic client / frontend at the Max/MSP side which communicates with a python (or otherwise) kernel using Jupyter protocols. This would be implemented in c or c++.

I raised this question at the jupyter forums and someone was kind enough to point me to the xeus project in case it, or one its subprojects, had already implemented the client side of the jupyter protocol in c or c++.

So far, I have a proof of concept Max external using zmq from the client side (thread-per-zmq-context to make it non-blocking to the Max ui) to communicate to a zmq server using basic request-reply type of exchange. Probably next step would be to create JSON message which conform to the client protocol via a library such as json-c. Nonetheless, if there is a something like your kernel code for the client side of the protocol in c++ or c it would obviously save a lot of time.

Thanks in advance for your help!

S

shakfu avatar May 05 '21 06:05 shakfu

Hi,

I have started to write a C++ implementation of a client (or, more precisely, of a framework for writing a client) for Jupyter, but it's far from being usable. It should be pushed to https://github.com/jupyter-xeus/xena when it is done.

This implementation will depend on xeus to reuse the serialization / deserialization of JSON messages.

JohanMabille avatar May 05 '21 14:05 JohanMabille

Thanks, Johan, that sounds great. Look forward to checking it out.

shakfu avatar May 05 '21 15:05 shakfu

Hi Johan, I've checked out the xena project but it looks likes it hasn't received much attention. How can one help?

shakfu avatar Jan 16 '22 12:01 shakfu

Hi,

Indeed I didn't have enough time to continue this side-project, I wil push what I have locally and open a bunch of issues of how I see further developments.

JohanMabille avatar Jan 17 '22 09:01 JohanMabille

Hi Johan,

Thanks, that would be great.

shakfu avatar Jan 17 '22 11:01 shakfu