How to enable multiple users' access in a web built using the Trame framework?

Hello there,

I’ve successfully implemented a user login system using Trame and PyVista. However, I’m facing an issue where all states and operations are bound to a single server. This means that when User A accesses the server on port 8080 and performs operations, User B, who also accesses the server on port 8080, can see User A’s operations in real-time. What I want to achieve is to allow multiple users to access the server independently, with each user having their own data upon login.

I understand that the get_server method can be used to create different servers to store distinct user states, but I’m unsure about how to route users to different pages based on their individual states. Essentially, I want to ensure that User A and User B can perform actions independently in their respective browsers.

Could you please provide guidance on how to achieve this multi-user access and separate user-specific data and operations?

I’m not sure if I expressed myself clearly.

Thank you!

1 Like

If you have just a basic trame app, bundling it with the trame docker image will make it multi-client automatically. See that example.

But if you have other web services on your server, then, things might be more complex and would need more understanding of your system to properly guide you. Feel free to reach out to us if you need additional support.

1 Like