-
Notifications
You must be signed in to change notification settings - Fork 295
Using the jupyterlab services API
Rich Chiodo edited this page Aug 3, 2022
·
17 revisions
This page describes how the Jupyter extension uses the [jupyterlab/services] API to connect and control Jupyter kernels.
Jupyter kernels are processes that handle a set of messages called the Jupyter Messaging Protocol (or JMP for short).
[diagram of connecting to a kernel with zeromq and sending a message]
The Jupyter org has provided an npm module to help with calling into a kernel from javascript. This npm module does the following:
- Opens a websocket to the Jupyter server (see raw vs jupyter for what we do when not using a Jupyter server)
- Creates an IKernelConnection interface for talking to the kernel
- Translates calls on the IKernelConnection to message structures
- Serializes the message structures into a specific wire-protocol that all kernels must implement
- Deserializes the message results from the wire-protocol back into messages, which in turn get changed into events in javascript.
The npm module essentially handles all communication to and from a kernel so that javascript can treat the kernel like a local object.
- Contribution
- Source Code Organization
- Coding Standards
- Profiling
- Coding Guidelines
- Component Governance
- Writing tests
- Kernels
- Intellisense
- Debugging
- IPyWidgets
- Extensibility
- Module Dependencies
- Errors thrown
- Jupyter API
- Variable fetching
- Import / Export
- React Webviews: Variable Viewer, Data Viewer, and Plot Viewer
- FAQ
- Kernel Crashes
- Jupyter issues in the Python Interactive Window or Notebook Editor
- Finding the code that is causing high CPU load in production
- How to install extensions from VSIX when using Remote VS Code
- How to connect to a jupyter server for running code in vscode.dev
- Jupyter Kernels and the Jupyter Extension