Add Positron Runtime Service to store session-scoped Language Runtime state #1155
Labels
area: core
Issues related to Core category.
area: workbench
Issues related to Workbench category.
epic
Epic
Milestone
Positron's Language Runtime Service is currently ephemeral. It stores no data of its own and doesn't persist between browser sessions (or reloads). Any information about the state of a language runtime that needs to persist between browser sessions must be handled entirely in the language pack. This is the reason that the Jupyter Adapter has a bunch of "reconnect" logic it runs to discover active kernels and then inform Positron about the state of active kernels after a reload.
We should consider implementing a persistent runtime service that gives us a place to store session-scoped information in a runtime-agnostic way. For example, it could:
In the case of language runtimes backed by Jupyter kernels, for example, the service would add a layer of abstraction between the front end and the kernel. It would serve as the kernel's client, and would be responsible for queuing work for the kernel and receiving all the kernel's output and forwarding it to the front end when there's one connected (and queuing it when no front end is connected).
There are some tradeoffs between the flexibility of having language runtimes manage things themselves and the advantages of a more homogenous but centralized solution, but it seems inevitable to me that we will need some kind of session-scoped service in order to have a robust implementation of Positron inside a browser-based environment like Posit Workbench.
The text was updated successfully, but these errors were encountered: