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

Support for RPC operations #343

Open
stefanoborini opened this issue Sep 19, 2020 · 4 comments
Open

Support for RPC operations #343

stefanoborini opened this issue Sep 19, 2020 · 4 comments

Comments

@stefanoborini
Copy link

stefanoborini commented Sep 19, 2020

More of a question than an issue.

I was wondering if kernel_gateway can be made to support RPC operations. Currently one can interact with the kernel via a websocket (which requires a constant connection between the web frontend and the kernel gateway) or via REST (which is disconnected, but assumes a REST API is the best abstraction for the endpoint I need to provide). I would like to invoke code on a provisioned kernel with a JSON-RPC invocation. Is this provided or planned? Thanks.

@kevin-bates
Copy link
Member

This is an interesting idea but given Kernel Gateway's support load, I don't see this being anything we can take on.

Would the idea be to use JSON to send messages to the kernel where the corresponding handler knows how to map the JSON keys to a valid kernel message (i.e., correct channel, etc.)? I'm not familiar with JSON-RPC (or the kernel messaging protocol for that matter).

This sounds like an avenue toward simplifying support for things like collaboration. Just wondering if this might be something to entertain more at the core level in, say, the new server (jupyter_server) - where collaboration is on the roadmap.

@stefanoborini
Copy link
Author

@kevin-bates Well, I currently have a problem where I have to spawn a kernel for a given user and run code in it. The kernel can be of any language. Currently, kernel_gateway is able to start kernels via a REST request, but then I can only communicate with it through a long lived websocket connection. I want to be able to invoke calls through a fire-and-forget HTTP request, whose result I can retrieve at a later stage with a fully disconnected transaction. That's at least the idea. I don't know if other subsystems of jupyter already provide this functionality

@kevin-bates
Copy link
Member

I don't know if other subsystems of jupyter already provide this functionality

I haven't heard of any, at least up the notebook stack, but there are many projects that leverage jupyter_client - which is the "core" for kernel messaging and management. You might try starting a discussion in the Special Topics category for the Jupyter Discourse Forum.

@meeseeksmachine
Copy link

This issue has been mentioned on Jupyter Community Forum. There might be relevant details there:

https://discourse.jupyter.org/t/starting-a-kernel-and-invoking-code-with-json-rpc/6087/1

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

No branches or pull requests

3 participants