Skip to content

Commit 588d627

Browse files
Add kernel launch sequence diagram to contributors guide (#1132)
* Add kernel launch sequence diagram to contributors' guide Co-authored-by: telamonian <[email protected]>
1 parent 0505bc1 commit 588d627

File tree

5 files changed

+59
-0
lines changed

5 files changed

+59
-0
lines changed

docs/doc-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ pydata_sphinx_theme
55
sphinx
66
sphinx-markdown-tables
77
sphinx_book_theme
8+
sphinxcontrib-mermaid
89
sphinxcontrib-openapi
910
sphinxcontrib_github_alt
1011
sphinxemoji

docs/source/_static/custom.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
body div.sphinxsidebarwrapper p.logo {
22
text-align: left;
33
}
4+
.mermaid svg {
5+
height: 100%;
6+
}

docs/source/conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"sphinx.ext.autosummary",
3232
"sphinx.ext.mathjax",
3333
"sphinxcontrib_github_alt",
34+
"sphinxcontrib.mermaid",
3435
"sphinxcontrib.openapi",
3536
"sphinxemoji.sphinxemoji",
3637
]
@@ -167,6 +168,12 @@
167168
# so a file named "default.css" will overwrite the builtin "default.css".
168169
html_static_path = ["_static"]
169170

171+
# These paths are either relative to html_static_path
172+
# or fully qualified paths (eg. https://...)
173+
html_css_files = [
174+
"custom.css",
175+
]
176+
170177
# Add any extra paths that contain custom files (such as robots.txt or
171178
# .htaccess) here, relative to this directory. These files are copied
172179
# directly to the root of the documentation.

docs/source/contributors/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ These pages target people who are interested in contributing directly to the Jup
2121
system-architecture
2222
docker
2323
devinstall
24+
sequence-diagrams
2425
debug
2526
roadmap
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Sequence Diagrams
2+
3+
The following consists of various sequence diagrams you might find helpful. We plan to add
4+
diagrams based on demand and contributions.
5+
6+
## Kernel launch: Jupyter Lab to Enterprise Gateway
7+
8+
This diagram depicts the interactions between components when a kernel start request
9+
is submitted from Jupyter Lab running against [Jupyter Server configured to use
10+
Enterprise Gateway](../users/connecting-to-eg.md). The diagram also includes the
11+
retrieval of kernel specifications (kernelspecs) prior to the kernel's initialization.
12+
13+
```{mermaid}
14+
sequenceDiagram
15+
participant JupyterLab
16+
participant JupyterServer
17+
participant EnterpriseGateway
18+
participant ProcessProxy
19+
participant Kernel
20+
participant ResourceManager
21+
Note left of JupyterLab: fetch kernelspecs
22+
JupyterLab->>JupyterServer: https GET api/kernelspecs
23+
JupyterServer->>EnterpriseGateway: https GET api/kernelspecs
24+
EnterpriseGateway-->>JupyterServer: api/kernelspecs response
25+
JupyterServer-->>JupyterLab: api/kernelspecs response
26+
27+
Note left of JupyterLab: kernel initialization
28+
JupyterLab->>JupyterServer: https POST api/sessions
29+
JupyterServer->>EnterpriseGateway: https POST api/kernels
30+
EnterpriseGateway->>ProcessProxy: launch_process()
31+
ProcessProxy->>Kernel: launch kernel
32+
ProcessProxy->>ResourceManager: confirm startup
33+
Kernel-->>ProcessProxy: connection info
34+
ResourceManager-->>ProcessProxy: state & host info
35+
ProcessProxy-->>EnterpriseGateway: complete connection info
36+
EnterpriseGateway->>Kernel: TCP socket requests
37+
Kernel-->>EnterpriseGateway: TCP socket handshakes
38+
EnterpriseGateway-->>JupyterServer: api/kernels response
39+
JupyterServer-->>JupyterLab: api/sessions response
40+
41+
JupyterLab->>JupyterServer: ws GET api/kernels
42+
JupyterServer->>EnterpriseGateway: ws GET api/kernels
43+
EnterpriseGateway->>Kernel: kernel_info_request message
44+
Kernel-->>EnterpriseGateway: kernel_info_reply message
45+
EnterpriseGateway-->>JupyterServer: websocket upgrade response
46+
JupyterServer-->>JupyterLab: websocket upgrade response
47+
```

0 commit comments

Comments
 (0)