jupyter-server / kernel_gateway

Jupyter Kernel Gateway
http://jupyter-kernel-gateway.readthedocs.org/en/latest/
Other
504 stars 130 forks source link

Question: Understanding of kernel_gateway and updated examples #349

Closed pakatagoh closed 4 years ago

pakatagoh commented 4 years ago

I'm creating a non-jupyter frontend that should be able to send python code to the kernel, and get back the result.

Similar to what was written in the README

Enable a new breed of non-notebook web clients to provision and use kernels (e.g., web dashboards using jupyter-js-services)

I've also taken a look at the example from the link below but it's making use of the now deprecated jupyter-js-servcies npm package. https://github.com/jupyter/kernel_gateway_demos/tree/master/node_client_example

And I've taken a look at the new @jupterlab/services package example with node below https://github.com/jupyterlab/jupyterlab/tree/master/packages/services/examples/node

Taking a look at the second @jupyterlab/services package, looks like it's meant to be run in conjunction and with Jupyter notebook server?

The README for Jupyter Kernel gateway still points to jupyter-js-services as the package to use to communicate with the gateway.

Just wondering if there's going to be an update on the documentation for someone who wants to have their frontend just talk to the gateway API and is not using the Jupyter notebooks server

Hope to get some clarification! thanks!

kevin-bates commented 4 years ago

Hi @pakatagoh - I apologize for the lack of information, but, to be honest, it's probably not going to get much better.

The Enterprise Gateway repository has a client that it uses to perform some of its tests. Although there is no current intention of "packaging" this up, it may provide enough information/examples to get you started. You can find this here: https://github.com/jupyter/enterprise_gateway/tree/master/enterprise_gateway/client

pakatagoh commented 4 years ago

@kevin-bates Thanks for the quick reply! and also thanks for the link to the sample client. Hopefully, the docs will get a face lift some time in the near future!

My team and I are working on a node.js server that would talk to the gateway and jupyterlab/services package seems to do a lot of the heavy lifting but there are some features built in to the package which may not require of course (like the polling of the gateway to retrieve the kernel status, which we may or may not need)

Nonetheless, it's a great project. Looking forward to future improvements!

kevin-bates commented 4 years ago

@pakatagoh - if you don't need the notebook-http mode of JKG, I would recommend just using Enterprise Gateway as it's essentially a superset of jupyter-websocket mode and since this repository is not actively maintained - as you have already noticed.

pakatagoh commented 4 years ago

Thanks for the info! Yeah I'll probably be switching over to JEG since it's more active and like you said, has everything that JKG has.