-
Notifications
You must be signed in to change notification settings - Fork 846
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
Modular Server doesn't handle multiple connections properly #856
Comments
Thank you for the bug report! Could you submit your patch as a Pull Request?? |
This allows multiple tab to be opened onto the same webserver, with each tab running their own model. Fixes projectmesa#856
This allows multiple tabs to be opened onto the same webserver, with each tab running their own model. Fixes projectmesa#856
@NeilW |
This allows multiple tabs to be opened onto the same webserver, with each tab running their own model. Fixes projectmesa#856
I've added a PR. Apologies for not getting onto the tests. They looked like they may need a bit of refactoring and I haven't had the bandwidth to tackle them |
This allows multiple tabs to be opened onto the same webserver, with each tab running their own model. Fixes projectmesa#856
I tested running multiple tabs for the Solara viz, and one of the tabs crashed. It looks like the only way for the Solara viz to be accessed in parallel in public is via Jupyter. |
Interesting, what was the error message? |
It's a deep traceback:
|
I just tested with 2 tabs (one in incognito) via Jupyter. The 2 simulations in the 2 tabs run in parallel, independently. This means that we can offload #481 to point to how to expose a Jupyter server to be web public. |
One complication is that, some users probably don't want to expose their full source code. I will ask at Solara Discord about this topic. |
It seems to be a fixable problem. From Solara Discord:
|
Fixed in #1759 for Solara. |
Describe the bug
If you open multiple tabs in your browser to the Mesa server you still only get one model running. Altering the paramenters on one tab affects the model output on all the others.
Expected behavior
Each tab should run its own instance of the model. Messages from the client should be applied to
the model associated with the web socket.
To Reproduce
Open multiple tabs and point them at the mesa server. Adjusting the parameters on one tab will alter the output on the others.
Additional context
This fault stops the mesa server from being used as a public facing application server. It's fairly easy to fix. The model just has to be lifted from the application to the socket handler and the socket can act as the session layer. I've made the necessary alterations here: https://github.com/newwayland/baseline-economy/blob/master/BaselineEconomy/ModularVisualization.py
The text was updated successfully, but these errors were encountered: