ideonate / cdsdashboards

JupyterHub extension for ContainDS Dashboards
https://cdsdashboards.readthedocs.io/
Other
200 stars 38 forks source link

Create a dashboard instance per user #23

Closed adriendelsalle closed 4 years ago

adriendelsalle commented 4 years ago

Hi! Thank you for this great project!

Description

I'm not 100% sure, but it seems that when you share a dashboard, other users will connect to the same server.

It can/will cause bad experiences when building interactive dashboards for example: user1 changes a slider and user2 sees an unexpected update!

It is quite the same behaviour you have when multiple users are connecting a single-user JupyterLab instance.

Proposition

Spawn a per user dashboard server.

Discussion

Be sure that all the dashboarding solutions handled (such as Voilà) use input files as read-only to avoid conflicts?

You can not garantee that the code inside the notebook isn't reading or writing files in the current path during execution, also causing collisions..

danlester commented 4 years ago

Thank you very much for creating this issue!

This has been suggested by some other users, but generally only where there is some kind of problem with the underlying framework. (For example, Streamlit had a problem where some users would see state from other users' sessions, but I think that is fixed now.)

Voila is designed to completely isolate different user sessions - a new 'Jupyter' kernel is created for each connection, so generally there should not be conflicts.

I haven't seen any problems with Voila, at least with standard ipywidgets etc. Is there something you've seen, or are you just anticipating an issue?

I'd be really interested to see an example where Voila goes wrong with multiple users accessing at the same time. Please supply one if you can!

By the way, I wrote up an article examining the different execution models of a few different frameworks, explaining what to expect with multiple users and shared state etc: Looking under the hood at the Dashboarding frameworks

adriendelsalle commented 4 years ago

Hi @danlester ! Thank you for this response! Your article is very good BTW :)

I was expecting the same mechanism as JLab for Voilà: multiple access to the same kernel. @fcollonval tested today with Voilà and confirms multiple kernels are created.

Thanks again for your time and congrats for this project!

danlester commented 4 years ago

Fantastic! Great to hear you like the article too!

Let me know how it all goes.