Skip to content

Commit 49fdcfe

Browse files
committed
wip
1 parent 45b785e commit 49fdcfe

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

packages/services/src/kernel/kernel.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ export namespace Kernel {
2828
* a websocket connection internally, and will auto-restart if the websocket
2929
* temporarily loses connection. Restarting creates a new Kernel process on
3030
* the server, but preserves the Kernel id.
31+
*
32+
* The IKernelConnection is notably missing the full IKernel signals. This
33+
* interface is for situations where a kernel may change, but we want a user
34+
* to not have to worry about disconnecting and reconnecting signals when a
35+
* kernel is swapped. The object that maintains an IKernel, but only provides
36+
* a user with an IKernelConnection should proxy the appropriate IKernel
37+
* signals for the user with its own signals. The advantage is that when the
38+
* kernel is changed, the object itself can take care of disconnecting and
39+
* reconnecting listeners.
3140
*/
3241
export interface IKernelConnection extends IDisposable {
3342
/**
@@ -63,6 +72,11 @@ export namespace Kernel {
6372
*/
6473
readonly status: Kernel.Status;
6574

75+
/**
76+
* The current connection status of the kernel.
77+
*/
78+
readonly connectionStatus: Kernel.ConnectionStatus;
79+
6680
/**
6781
* The cached kernel info.
6882
*

packages/services/src/session/manager.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@ import { ServerConnection } from '../serverconnection';
1515

1616
import { Session } from './session';
1717

18+
/**
19+
* We have a session manager that maintains a list of models from the server.
20+
* Separately, we have a list of running sessions maintained by the DefaultSessions
21+
*
22+
* Perhaps we have *one* list of models, with a separate possible session connection for each model.
23+
*
24+
* Also, we should be able to modify the session information without a session connection - that's just a server request, and doesn't require a kernel connection.
25+
*
26+
*
27+
*/
28+
1829
/**
1930
* An implementation of a session manager.
2031
*/

packages/services/src/session/session.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import { DefaultSession } from './default';
2121
export namespace Session {
2222
/**
2323
* Interface of a session object.
24+
*
25+
* A session object represents a live connection to a session kernel.
2426
*/
2527
export interface ISession extends IDisposable {
2628
/**

0 commit comments

Comments
 (0)