Replies: 1 comment 4 replies
-
IMO the first timeout that we have to add are the one for components that are never closed properly. If the last user of an app closes his browser, all the environment elements should stop. We then can use timeouts to optimize some resources. For example:
|
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@lenra-io/devs
Environment & Session timeout
We need to think about timeout so for now i remove timeout in this PR. With this change, we stop the session supervisor and all supervised genserver when the socket close, on closing we notify the Environment's Dynamicsupervisor which checks if there are still sessions using the environment, otherwise it stops itself.
For now what i think about timeout:
In my opinion, the overall logic we need to use to properly manage timeouts is as follows: when a genserver is in timeout, we notify the corresponding supervisor who closes the session and/or the environment, depending on the context.
Here are some ideas, feel free to comment.
Session
For the session, we can add a timeout on RouteServer and stop SessionSupervisor on the timeout, we can also keep the supervisor shutdown on the socket shutdown.
We keep the notification to the environment with Environment.DynamicSupervisor.session_stopped.
Environment
For the environment, I think we need to add a timeout on the view server. When a view server stops, the environment is informed and if no other view server is running, we can stop the environment (and the session, but actually all sessions normally have timeout before).
Restart ?
With this idea we can have a case where the socket is still running, but after 5 minutes the session expires and after 10 minutes it's the environment (in case we are the only person using the environment), so the user can still run the headphones, should we implement a restart for the session and / or the environment or we send an error message to inform the user about the timeout ?
Beta Was this translation helpful? Give feedback.
All reactions