Skip to content

Is request-scoped kernel isolation possible? #281

@mattmutt

Description

@mattmutt

Hi @echarles , great open source tools from datalayer for a foundation to make Jupyter work with React.

I was looking for guidance or source code pointers to using the React components or datalayer wrapper classes to make a series of input blocks use different kernel processes behind the scenes. I realize this is opposite of the how notebooks work ( 1 kernel for the entire collection of related cells ), but I need isolation to avoid variables and state from being shared.

Problem

I can easily execute all these blocks just fine using kernel.requestExecute() programmatically, but the variables from other blocks are shared, causing problems.

Suggested Improvement

Any further documentation or links of how to use datalayer to invoke the kernel with isolation.

I built a visual demo using many of the datalayer foundation classes, but could not figure out an easy way to have separate kernel processes started for each of the areas. That means the variables are all global, which is undesired.

My example does not use a Notebook concept, but rather experiments with two approaches. A basic Jupyter API combined with a little handwritten React and another that uses the familiar datalayer React Cell component, which looks nicer due to the CodeMirror formatting.

kernel-execution-blocks

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions