Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do we need NotebookManager? #63

Open
fonsp opened this issue Jan 16, 2023 · 1 comment
Open

Do we need NotebookManager? #63

fonsp opened this issue Jan 16, 2023 · 1 comment
Assignees

Comments

@fonsp
Copy link
Member

fonsp commented Jan 16, 2023

The docstring for NotebookManager:

/**
 * It is not possible to 'open' an already open notebook i.e.
 * a notebook that has not been shutdown by Pluto.
 *
 * This manager manages the currently
 * open notebooks and gives us ids of already open notebooks
 * so that we can directly go to the **edit** url.
 */

This is not true: you can open a file that is already open, and Pluto will just send you the ID of the already running notebook.

The Pluto server already keeps track of the list of running notebooks, and it seems error-prone to also keep track of this list in the electron process. We could:

  • Not keep track of it at all, where do we need it? Perhaps we can make a change to Pluto's REST API to avoid this need? E.g. add a header that says notebook-was-already-running: true?
  • If it is necessary somewhere, request the notebook list on demand, without storing the result.
@ctrekker
Copy link
Member

There are certain features that require this list, but I'd say performing this query on-demand is the best way to go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants