|
| 1 | +.. _architecture: |
| 2 | + |
| 3 | +Architecture Diagrams |
| 4 | +===================== |
| 5 | + |
| 6 | +This page describes the Jupyter Server architecture and the main workflows. |
| 7 | +This information is useful for developers who want to understand how Jupyter |
| 8 | +Server components are connected and how the principal workflows look like. |
| 9 | + |
| 10 | +To make changes for these diagrams, use `the Draw.io <https://app.diagrams.net/>`_ |
| 11 | +open source tool to edit the png file. |
| 12 | + |
| 13 | + |
| 14 | +Jupyter Server Architecture |
| 15 | +--------------------------- |
| 16 | + |
| 17 | +The Jupyter Server system can be seen in figure below: |
| 18 | + |
| 19 | +.. image:: ../images/jupyter-server-architecture.drawio.png |
| 20 | + :alt: Jupyter Server Architecture |
| 21 | + :width: 100% |
| 22 | + :align: center |
| 23 | + |
| 24 | +Jupyter Server contains the following components: |
| 25 | + |
| 26 | +- **ServerApp** is the main Tornado-based application which connects all |
| 27 | + components together. |
| 28 | + |
| 29 | +- **Config Manager** initializes configuration for the ServerApp. You can define |
| 30 | + custom classes for the Jupyter Server managers using this config and change |
| 31 | + SererApp settings. Follow :ref:`the Config File Guide <other-full-config>` to |
| 32 | + learn about configuration settings and how to build custom config. |
| 33 | + |
| 34 | +- **Custom Extensions** allow you to create the custom Server's REST API endpoints. |
| 35 | + Follow :ref:`the Extension Guide <extensions>` to know more about extending |
| 36 | + ServerApp with extra request handlers. |
| 37 | + |
| 38 | +- **Gateway Server** is a web server that, when configured, provides access to |
| 39 | + Jupyter Kernels running on other hosts. There are different ways to create a |
| 40 | + gateway server. If your ServerApp needs to communicate with remote Kernels |
| 41 | + residing within resource-managed clusters, you can use |
| 42 | + `Enterprise Gateway <https://github.com/jupyter-server/enterprise_gateway>`_, |
| 43 | + otherwise, you can use |
| 44 | + `Kernel Gateway <https://github.com/jupyter-server/kernel_gateway>`_, where |
| 45 | + Kernels run locally to the gateway server. |
| 46 | + |
| 47 | +- **Contents Manager and File Contents Manager** are responsible for serving |
| 48 | + Notebook on the file system. Session Manager uses Contents Manager to receive |
| 49 | + Kernel path. Follow :ref:`the Contents API guide <contents_api>` to learn |
| 50 | + about Contents Manager. |
| 51 | + |
| 52 | +- **Session Manager** processes users' Sessions. When a user starts a new Kernel, |
| 53 | + Session Manager starts a process to provision Kernel for the user and generates |
| 54 | + a new Session ID. Each opened Notebook has a separate Session, but different |
| 55 | + Notebook Kernels can use the same Session. That is useful if the user wants to |
| 56 | + share data across various opened Notebooks. Session Manager uses SQLite3 |
| 57 | + DataBase to store the Session information. The database is stored in memory by |
| 58 | + default, but can be configured to save to disk. |
| 59 | + |
| 60 | +- **Mapping Kernel Manager** is responsible for managing the lifecycles of the |
| 61 | + Kernels running within the ServerApp. It starts a new Kernel for a user's Session |
| 62 | + and facilitates interrupt, restart, and shutdown operations against the Kernel. |
| 63 | + |
| 64 | +- **Jupyter Client** library is used by Jupyter Server to work with the Notebook |
| 65 | + Kernels. |
| 66 | + |
| 67 | + - **Kernel Manager** manages a single Kernel for the Notebook. To know more about |
| 68 | + Kernel Manager, follow |
| 69 | + `the Jupyter Client APIs documentation <https://jupyter-client.readthedocs.io/en/latest/api/manager.html#jupyter_client.KernelManager>`_. |
| 70 | + |
| 71 | + - **Kernel Spec Manager** parses files with JSON specification for a Kernels, |
| 72 | + and provides a list of available Kernel configurations. To learn about |
| 73 | + Kernel Spec, check `the Jupyter Client guide <https://jupyter-client.readthedocs.io/en/stable/kernels.html#kernel-specs>`_. |
0 commit comments