PSC-PublicHealth / HERMES

0 stars 0 forks source link

startup and shutdown #92

Open Xuth opened 6 years ago

Xuth commented 6 years ago

There needs to be strong systems in place to start up and shutdown hermes, in sync with the browser usage.

If using CEF, this is relatively straightforward. Start the server, start CEF pointed at the server, when the CEF process shuts down, shut down the server. There are still issues you try to open hermes a second time (we should detect this and instead of trying to open a second instance, we should bring the first instance to focus).

If not using CEF, the process looks like: Start the server, open a browser window pointed at the server, user closes browser window, ???

??? can be handled by:

As alluded to in the CEF case there are issues of trying to open hermes twice. Similarly, hermes doesn't handle having two browser window sessions hitting the server because state is stored in cookies that are shared between all browser windows. Maybe hermes should detect this and pop up a message saying that the old browser tab has been deactivated?