-
Notifications
You must be signed in to change notification settings - Fork 308
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
Extract out kernels #1104
Comments
Thanks for bringing this up @davidbrochart. Are you able to add this to the agenda for this week's Server meeting? I view terminals as optional and kernels, well, less so. Some view terminals as a security issue and need to disable their functionality. While the same could be argued about kernels, they are core functionality. That said, this does move us toward a more composable server as discussed here and here.
FWIW, this functionality exists today by configuring a Gateway server (Kernel or Enterprise) using |
Thanks, I just did it. |
I started some work in #1106 and https://github.com/davidbrochart/jupyter_server_kernels. |
Hey! What are you trying to do... turn jupyter_server into jupyverse? 😉 In all seriousness, this is certainly a road we could go down in Jupyter Server, but would it be better to just switch to jupyverse for a more composable server? |
😄 I don't know, it could also make sense to compose a server with parts of jupyter-server and jupyverse. |
this. ideally, there would be no knowledge of a down-and-dirty http/websocket request/response in a this paves the way not only for composability between python implementations, but opens the door for swappable pieces that balance extensibility (not everything has to be only slightly further afield: non-emscripten WASM has the potential to play a very compelling role... a large chunk of jupyterlite, |
With #1106 and jupyter_server_kernels, a mixed jupyter-server/jupyverse server is already possible, by using jupyter_server_kernels_proxy to proxy fps-kernels.
This last point is actually quite powerful, because it does for free what we currently do with jupyter-kernel-gateway, and it's also a very simple alternative to kernel provisioners: the server and the kernels don't have to live in the same environment. |
While I agree that Users want their kernels to use a varying amount of Memory, GPUs, etc. in a separate kubernetes pod, while another needs their kernel launched within a Hadoop YARN cluster running as the Spark driver, cannot accomplish those integrations without Kernel Provisioners. Kernel Provisioners abstract the kernel management lifecycle, which is completely unrelated to the server that launches those processes, and are responsible for provisioning those specific environments in which the kernel will run. The proxied kernel server (however that is accomplished) detaches the end-user's notebook server from its kernel server (which is great), but provisioners take that extra step of moving the kernel resources off of the "kernel server" in a pluggable fashion within today's launch framework. |
+1
We can design for any composable server, my 3 requirements would be:
|
We'll try our best, but one can't make an omelette without breaking eggs 😄
The proxies are for demonstration purpose, to show that we can swap a jupyter-server service with a jupyverse service, but of course they are not part of #1106 or https://github.com/davidbrochart/jupyter_server_kernels.
😆 |
Someone needs to write a documentation site called Jupyterpedia... 😉 |
Yep. A heavyweight solution like backstage.io would do this most robustly. It's generally more organized around product rather than projects, and automates a lot of communication (e.g. release notifications, etc) that we're either doing manual today, or just doesn't happen. Actually seems like something NumFocus would be at the right scale to effectively operate, akin to the mastodon discussion on discord. Lighter-weight, static, and more reproducible for And, of course: a backstage that was also a lite site, such that all the underlying data from disparate sources was computable from within the browser would be an insane value-add. |
I'd argue we need fewer split-out packages for the server, not more. I don't think making everything a separate package and extension is a positive direction for jupyter-server. It makes almost everything about running, installing, understanding, and debugging more complex. While I think supporting alternate implementations is good, I think the default implementation of almost everything should reside in jupyter-server. |
Is there a chance we could revert the extraction of jupyer-server-terminals? It's not true that we need to remove these packages to make them overrideable (already true for KernelManager, ContentsManager, etc.). It seems like it would be quite a bit better and simpler to keep the default implementations in the base server package, rather than breaking it into plugins with circular dependencies on the server, indicating that they aren't really separate at all. |
I think the extraction of terminals was for a security reason, to give a strong(er) guarantee that users cannot do arbitrary operations on the backend. It feels safer if the backend doesn't even have the package installed to launch a terminal, rather than disabling terminals in a config file, with the possibility to forget to do it. |
I agree with the sentiment in general. I agree with Min that we shouldn't extract out the kernels API into a separate plugin in
I do think terminals is a special case here. The goal wasn't to make them just overrideable; rather, it was to make it possible not to register their REST/Websocket handlers with the server at all. Making them a server extension enables deployers to opt out of exposing the terminal endpoints. The general consensus at the time is that, in the long run, we shouldn't ship terminals by default with Jupyter Server.
The circular dependency was meant to be a temporary transition period in Jupyter Server 2.0. In 3.x, we wouldn't have jupyter_server_terminals listed as a hard dependency of Jupyter Server at all. This would truly be a separate plugin/extension that folks (and clients like Lab) could optionally require. |
Problem
We have extracted out jupyter-server-terminals, should we do the same for kernels?
Proposed Solution
Create a
jupyter-server-kernels
package.Additional context
This would allow to proxy the kernels service, as it's done for terminals in jupyter-server-terminals-proxy.
The text was updated successfully, but these errors were encountered: