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

async endpoints in a single notebook using notebook-http method #329

Open
shreyashk09 opened this issue Dec 4, 2019 · 1 comment
Open

Comments

@shreyashk09
Copy link

Hi, I didn't find any method to auto spawn kernels or to process multiple requests at a time asynchronously. I am finding the requests being processed parallelly is equal to the number of prespawn notebooks specified, else they are processed serialized.

@kevin-bates
Copy link
Member

Hi @shreyashk09. Your observations are what I'd expect right now. Both kernel startup and communication are synchronous...until recently.

jupyter_client (on which notebook sits on which kernel gateway sits) recently added support for both async kernel client and manager. Also, notebook will support async kernel management in its next release after jupyter/notebook#4479 was merged.

To take advantage of this, Kernel Gateway will require two slight changes in kernel_gateway/services/kernels/manager.py to change their classes to derive from the Async forms of MappingKernelManager and IOLoopKernelManager. While both jupyter_client and notebook retain their synchronous classes as well, I don't think KernelGateway would need to do the same and could just switch to the Async forms.

If you'd like to make that change and see if it resolves this issue that would be much appreciated. I've already made a similar change in this Enterprise Gateway PR - just waiting for the Notebook release.

If you have any questions, I'd be happy to assist.

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