Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
shakfu opened this issue May 5, 2021 · 5 comments
Open

Comments

@shakfu
Copy link

shakfu commented May 5, 2021

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

@JohanMabille
Copy link
Member

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.

@shakfu
Copy link
Author

shakfu commented May 5, 2021

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

@shakfu
Copy link
Author

shakfu commented Jan 16, 2022

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

@JohanMabille
Copy link
Member

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.

@shakfu
Copy link
Author

shakfu commented Jan 17, 2022

Hi Johan,

Thanks, that would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants