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

Introduce ServerKernelManager class #15

Closed
wants to merge 2 commits into from
Closed

Conversation

kevin-bates
Copy link
Owner

@kevin-bates kevin-bates commented Nov 28, 2022

Per this comment/response, this pull request introduces a ServerKernelManager class which is instantiated by default within the AsyncMappingKernelManager for each managed instance. Currently, ServerKernelManager derives from jupyter_client's AsyncIOLoopKernelManager, thereby preserving existing functionality.

Introducing this class allows the Server to use this implementation to provide server-specific functionality like kernel-based events, the potential for highly available kernels, etc., and re-enforces the notion that the KernelManager class (and corresponding functionality) is the purview of the application.

Applications bringing their own subclass of AsyncIOLoopKernelManager should update their implementations to derive from ServerKernelManager or risk missing functionality that ultimately is associated with ServerKernelManager.

With this PR the activity-tracking attributes that were previously patched onto the current instance are formally defined traits. As a result, the execution_state's initial value is "initializing", which will be set to "starting" upon the completion of the start_kernel() method. If this complicates state management too much, we can have the initial state be "starting", but I felt "initializing" was more correct.

Note that this PR does NOT introduce a similarly named class relative to MappingKernelManager. This simplifies support and serves as an impetus for applications/server extensions to switch to using the async kernel management.

@kevin-bates kevin-bates changed the title Introduce ServerKernelManager instance Introduce ServerKernelManager class Nov 28, 2022
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

Successfully merging this pull request may close these issues.

1 participant