Hello Andrew,

since you want to send the code for execution, you will have to run the 
kernel gateway in websocket mode. That means it's not a simple HTTP/REST 
call with "execute this" in the request and "here's the result" in the 
response. The sequence is more like:

1. Check if an instance of the kernel is already running.
1a. Yes: get the ID of that instance.
1b No: start a new instance and use that ID.
2. Connect to the kernel via websocket.
3. Send code for execution through websocket.
4. Receive the result through websocket.
4a. If execution fails, you might see helpful error messages on other 
channels, also through websocket.
5. Disconnect from the kernel.

Have a look at this if you're working with JavaScript:
https://github.com/jupyterlab/services/blob/master/examples/node/index.js

If you knew in advance what functions have to be executed, you could run 
the kernel gateway in notebook mode and get a simple request/response API. 
The notebook mode currently supports only a single notebook and kernel. You 
could either run one gateway for each kernel you need, or enhance the 
kernel gateway code to suit your needs.

hope that helps,
  Roland

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/1c3d4725-26f3-4b70-9dba-a31e039e936c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to