Clarifying intent of the kernel_gateway

79 views
Skip to first unread message

Bergam

unread,
Apr 4, 2017, 3:21:50 PM4/4/17
to Project Jupyter
I'm interested in using the "kernel_gateway" (https://github.com/jupyter/kernel_gateway) for re-architecting an existing Notebooks application, but I'm confused whether "kernel_gateway" supports my use case.  All I really need is a headless notebook server.  I already have a simple UI for adding/removing cells, executing code, etc. I just want it to interact with a remote API (REST/WS is fine) for all notebook/kernel operations.

I've been reading these posts trying to get a better idea if the kernel gateway is the answer:


In the first post, it says it provides a "100% Jupyter Notebook server compatible API", but I'm not able to see any evidence of an API for notebooks (e.g. insert cell, update cell, etc.).  All I see are 2 modes of operation: "notebook_http" (which let's you expose notebook cells as REST endpoints) and "jupyter_websocket" (which let's you communicate directly to kernels via WS instead of 0mq).

Of course I could still use the "kernel_gateway" for the WS to 0mq functionality, but I think I would have to manage the state/formatting of the .ipynb myself (which I'm hoping to avoid). Should I just host a Jupyter Notebook Server and simply hide all of the UI endpoints that I don't need?

Thomas Kluyver

unread,
Apr 5, 2017, 10:03:59 AM4/5/17
to Project Jupyter
On 4 April 2017 at 20:21, 'Bergam' via Project Jupyter <jup...@googlegroups.com> wrote:
In the first post, it says it provides a "100% Jupyter Notebook server compatible API", but I'm not able to see any evidence of an API for notebooks (e.g. insert cell, update cell, etc.).

That claim means that it provides the same REST API as the Jupyter notebook server, which is detailed here:
https://github.com/jupyter/jupyter/wiki/Jupyter-Notebook-Server-API

The REST API doesn't include endpoints for modifying cells, because the notebook server doesn't work that way - the frontend retrieves an entire notebook from the contents API, manipulates cells in memory, and then sends the entire notebook back to the server to save. We do have plans to store the notebook model in the server so that multiple clients can edit it simultaneously, but that's still some way off.

Thomas

Bergam

unread,
Apr 5, 2017, 11:39:38 AM4/5/17
to Project Jupyter
Thanks, Thomas! It sounds like both the kernel_gateway and the Jupyter Notebook server would both work for my purposes then. Is the kernel_gateway ready for production use?

Thomas Kluyver

unread,
Apr 5, 2017, 11:56:05 AM4/5/17
to Project Jupyter
On 5 April 2017 at 16:39, 'Bergam' via Project Jupyter <jup...@googlegroups.com> wrote:
Is the kernel_gateway ready for production use?

AFAIK yes, but I hope some of the people who built it will chime in.

Fernando Perez

unread,
Apr 21, 2017, 6:00:46 PM4/21/17
to Project Jupyter

On Wed, Apr 5, 2017 at 8:55 AM, Thomas Kluyver <tak...@gmail.com> wrote:
AFAIK yes, but I hope some of the people who built it will chime in.


Bumping this in case Peter Parente or some of the other folks on that team have extra info?


--
Fernando Perez (@fperez_org; http://fperez.org)
fperez.net-at-gmail: mailing lists only (I ignore this when swamped!)
fernando.perez-at-berkeley: contact me here for any direct mail

Peter Parente

unread,
Apr 22, 2017, 10:38:26 PM4/22/17
to Project Jupyter
>  It sounds like both the kernel_gateway and the Jupyter Notebook server would both work for my purposes then.

Most likely, yes.

> Is the kernel_gateway ready for production use?

I guess it depends on what "ready for production use" means to you. The project has:

- Numpy style docstrings throughout
- A solid foundation in the jupyter/notebook source code 
- Reached (and passed) a 1.0 milestone follwing semantic versioning (http://semver.org/)
- The same open source license and contribution model as other jupyter projects 
- A handful of demos of how it might be used (https://github.com/jupyter/kernel_gateway_demos)
- Issues like any other software project (https://github.com/jupyter/kernel_gateway/issues)

Cheers,
Pete

Fernando Perez

unread,
Apr 24, 2017, 6:50:38 PM4/24/17
to Project Jupyter
On Sat, Apr 22, 2017 at 7:38 PM, Peter Parente <par...@gmail.com> wrote:
I guess it depends on what "ready for production use" means to you. The project has:

- Numpy style docstrings throughout
- A solid foundation in the jupyter/notebook source code 
- Reached (and passed) a 1.0 milestone follwing semantic versioning (http://semver.org/)
- The same open source license and contribution model as other jupyter projects 
- A handful of demos of how it might be used (https://github.com/jupyter/kernel_gateway_demos)
- Issues like any other software project (https://github.com/jupyter/kernel_gateway/issues)

Pete, thanks so much for this input.  I want to add that k_g was a model of the open development under our incubator org that was then "graduated" into an official part of Jupyter thanks to the work of Pete and others spearheading the effort.  The fact that it's now hosted under the Jupyter org is a signal that it is now "part of the project" and we all will do our best to keep it healthy and its users happy, as well as using it as a building block for other tools when appropriate.  

Obviously no warranty of anything, etc, as usual with OSS, and only you can answer whether it meets your needs or not.

Cheers

f
Reply all
Reply to author
Forward
0 new messages