-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
WebAgg for multiple clients #2620
Comments
Yes -- the multiple clients/one figure mode is how the built-in WebAgg server and the |
I looked at the example, however I think its the same in the build-in WebAgg serrver: if you open two tabs in a browser you can manipulate the figure in the other tab. |
It is the same as the built-in webserver -- it will have to be modified to create a new figure and route a new web socket to it with each page request. You will need a separate websocket per figure, but the number should remain quite low per browser... |
I tried to implement this, but now I have the problem, that the figure is not shown. If I look at the tornado demos it seems that the usual programming style is to define RequestHandlers outside of the application, which is what I did. Maybe this is a reason for my problems, but I'm not sure (I used the application to store the figures and managers). Are there any reason, that you defined everything under the application? In general I think it would be useful, if the embedding_webagg example could look more like the tornado demos. |
@mdboom Not sure what to do about this one. |
Closing due to inactivity. @bmu If you are still working on this please ping me to have it re-opened. |
Recently I wanted to create a multi-client webagg server and even though this issue is ~10 years old, it was the only helpful source of information I could find... The good thing is that it was enough to get things started and now I have a working example for a multi-client setup! In case anyone is still interested, let me know! |
@raphaelquast could you share a reference? I also have a very rough prototype of serving mpl figures via fastAPI https://github.com/tacaswell/matplotlib-fastapi |
@tacaswell I quickly created a repo that contains a minimal example for my tornado multi-client setup:
You might also be interested in having a look at my latest PR (#27160) which fixes webagg performance issues when using callbacks that trigger draw (or blit)-events in webagg. |
I just integrated the webagg backend in a tornado application to visualize some data.
However the problem is, that a user on one client can manipulate the figures on another client. Maybe this is a problem of my application, but I think it would be awesome if you could really integrate the webagg backend in a multi client application.
I would like to implement something to separate this, e.g. creating a new figure for every request and using a separate websocket for every client, however I a not sure how to do this.
Do you have any ideas?
The text was updated successfully, but these errors were encountered: