Support running kernels in multiple locations (locally or remote) simultaneously.#1601
Draft
ojarjur wants to merge 11 commits intojupyter-server:mainfrom
Draft
Support running kernels in multiple locations (locally or remote) simultaneously.#1601ojarjur wants to merge 11 commits intojupyter-server:mainfrom
ojarjur wants to merge 11 commits intojupyter-server:mainfrom
Conversation
The only differences between GatewaySessionManager and the underlying SessionManager type were: 1. Calling `get_kernel` inside the `kernel_cull` method to determine if the kernel exists. The underlying `SessionManager` class was instead checking if the specified kernel_id was *in* the MultiKernelManager. However, the MultiKernelManager class implements `get_kernel` by indexing into itself, so we could make the base SessionManager class also call `get_kernel` and it would be made compatible with `GatewayMappingKernelManager` while still remaining compatible with any other subclass of MultiKernelManager. 2. Specifying that the `kernel_manager` was of type `GatewayMappingKernelManager`. This was unnecessary because the kernel_manager_class was already being set to that inside of `serverapp.py`, and the `test_gateway.py` test has been updated to verify that the GatewayMappingKernelManager class is in fact being used.
…lass rather than requiring a single, global config
…y and pass calls to `is_alive` down to nested kernel managers
…r_server into ojarjur/gateway-providers
…l manager class is used
…anagers are instantiated with
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR extends the Jupyter server to support running kernels using multiple separate MappingKernelManagers simultaneously.
For example, you can run both local kernels and Kernel Gateway kernels at the same time without having to reconfigure (and restart) the server.
The topology for how these separate managers are plugged together is configurable, with the configuration being done by specifying a
RoutingProviderclass.This has been discussed multiple times both in issues on the jupyter_server repo and in community meetings.
The most recent and up-to-date such discussion is here.
That issue was opened to give a single place for folks to talk about the overall proposal and to raise any objections or concerns they might have about it.
No such objections have been raised, so I am proceeding with a PR to actually implement the proposal.