@@ -75,6 +75,7 @@ Execution of a Python code snippet: `print("hello")`
75
75
``` mermaid
76
76
sequenceDiagram
77
77
actor Frontend; participant Shared Document; actor Server; participant ExecutionStack; actor Kernel
78
+ Frontend->>Shared Document: [*] busy
78
79
Frontend->>+Server: POST /api/kernels/<id>/execute
79
80
Server->>+ExecutionStack: put() request into queue
80
81
ExecutionStack->>Kernel: Execute request msg
@@ -92,12 +93,15 @@ sequenceDiagram
92
93
ExecutionStack-->>Server: null
93
94
Server-->>-Frontend: Request status 202
94
95
end
95
- Kernel-->>ExecutionStack: Execution reply
96
+ Kernel-->>Server: Execution reply
97
+ Server->>Shared Document: [𝒏] idle
98
+ Server-->>ExecutionStack: execution_count, status, outputs
99
+ Shared Document->>Frontend: [𝒏] idle
96
100
deactivate Kernel
97
101
Frontend->>+Server: GET /api/kernels/<id>/requests/<uid>
98
102
Server->>ExecutionStack: get() task result
99
- ExecutionStack-->>Server: Result
100
- Server-->>-Frontend: Status 200 & result
103
+ ExecutionStack-->>Server: execution_count, status, outputs
104
+ Server-->>-Frontend: Status 200 & { execution_count, status, outputs }
101
105
```
102
106
103
107
### With input case
@@ -107,6 +111,7 @@ Execution of a Python code snippet: `input("Age:")`
107
111
``` mermaid
108
112
sequenceDiagram
109
113
actor Frontend; participant Shared Document; actor Server; participant ExecutionStack; actor Kernel
114
+ Frontend->>Shared Document: [*] busy
110
115
Frontend->>+Server: POST /api/kernels/<id>/execute
111
116
Server->>+ExecutionStack: put() request into queue
112
117
ExecutionStack->>Kernel: Execute request msg
@@ -138,12 +143,15 @@ sequenceDiagram
138
143
ExecutionStack-->>Server: null
139
144
Server-->>-Frontend: Request status 202
140
145
end
141
- Kernel-->>ExecutionStack: Execution reply
146
+ Kernel-->>Server: Execution reply
147
+ Server->>Shared Document: [𝒏] idle
148
+ Server-->>ExecutionStack: execution_count, status, outputs
149
+ Shared Document->>Frontend: [𝒏] idle
142
150
deactivate Kernel
143
151
Frontend->>+Server: GET /api/kernels/<id>/requests/<uid>
144
152
Server->>ExecutionStack: get() task result
145
- ExecutionStack-->>Server: Result
146
- Server-->>-Frontend: Status 200 & result
153
+ ExecutionStack-->>Server: execution_count, status, outputs
154
+ Server-->>-Frontend: Status 200 & { execution_count, status, outputs }
147
155
```
148
156
149
157
> \[ !NOTE\]
0 commit comments