Allow for multiple sessions per user/app combination

Hi!
Many thanks to developers for this feature! But how and where it should be configured?

Hi @Alexey_Kuzmrnkov,

This is supported out of the box now (since version 1.1.0) and does not require specific configuration.

Best,
Tobias

1 Like

Hi,

I have tried it out with v1.1.0 just now and did not succeed.

I had logged in in two different browser sessions, logged out from one, was automatically logged out from another.

What can i do to troubleshoot it please?

Tx!

Hi @Sasha

If you explicitly log out of the application, this is expected:

log out logic: should shut down all containers for a given user, so all user-app combinations and therefore all sessions of a single user/app combination

heart beat logic: the container for a particular user/app combination should only shut down if the heart-beat limit is reached for all of the sessions

Hope this helps!
Tobias

1 Like

I always wondered is it rational to kill all the containers when the user logouts? We already have a heartbeat mechanism and this sometimes would cause problem if user submits a task and it runs in a future.

Also I’m kind confused by multiple sessions per user/app combination. What does it achieve? It still means one user one app each time, just using different sessions?

Hi @Keqiang_Li,

This is the rationale behind allowing for multiple sessions per user/app combination:

  • a single user/app combination = 1 proxy = 1 container
  • multiple sessions (e.g. different browser tabs, different browsers etc.) should be possible to run on a single container
  • doing so respects our general tenet that Shiny apps on ShinyProxy function in exactly the same way as Shiny apps that are run locally (where you can also have multiple sessions connecting to the same port in different browser tabs)
  • there is no additional security risk compared to having a single session

Best,
Tobias

1 Like

Hi here. I can’t figure out how to configure shiny-proxy to launch new container per new user connection (not one container for all user connections). So two browser tabs running the same application will be served by two separate containers.
Any hints?

Hi, this is currently not possible. Because of the complexity with detecting unique tabs I don’t think we will implement this soon. However, for a user it is possible to launch multiple instances of an app. See: https://shinyproxy.io/documentation/ui/#using-multiple-instances-of-an-app

Hi @tdekoninck -

Happy new year 2023!!!

While using ShinyProxy 2.6.1 and setting up the max-instances field to 2, I was expecting a user to be able open the app twice (in 2 different tabs or browser instance) and to interact with each tab without having to wait for the other app to finish the task it was running.

Instead I still have the same behaviour that before (ante version 2.6.0) where if I click on 2 long-running tasks on both tabs, I would still have to wait for the first event to complete until the second get kicked in.

Did I misunderstand the feature here?

I could not find the answer in GitHub (https://github.com/openanalytics/shinyproxy/issues/395)

Thank you very much Tobia, Dylan