Exploring taipy's Suitability for State Management in a RPC/Web UI Service #227
-
Hello, Firstly, I would like to express my gratitude for your excellent work on the taipy project. I have been experimenting with your package, and I'm considering whether it aligns with my specific use case. I thought it would be best to ask here to ensure I'm not overlooking any potential solutions. To provide some context, I am developing a package for services that exposes an RPC server and a web UI. In this package, the user is expected to implement a class, the public attributes and methods of which are then exposed. Clients can connect to the service to invoke these methods or modify the class attributes. Essentially, the class encapsulates the business logic of my service.
Given these requirements, I am trying to ascertain whether taipy GUI is a suitable solution for my project. I am particularly interested in understanding how taipy handles state management. From my understanding, each connection to the web UI maintains its own set of variables along with their values. This seems to suggest that I cannot have a global state which is shared among all connections. I am wondering if it would be possible to have the web UI bind to the attributes of the class, which can then be updated through both web UI interactions and RPC calls? I would greatly appreciate any insights or advice you could provide on this matter. Thank you in advance for your time and assistance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, Thank you for your kind words and for considering Taipy for your project. We would happily provide insights into how Taipy handles state management and whether it aligns with your requirements. Taipy offers a way to execute a function periodically. Using long callbacks, you are able to call a function with a frequency and execute functions depending on what time it is. We could provide more code to satisfy your needs. Taipy also has a built-in data and pipeline management system that allows you to manage your tasks and data quickly and efficiently. It is referred to as Taipy Core in the documentation, and we might add a CRON directly to it in the future. Regarding "state" management, by default, Taipy follows a request-response model where each client connection maintains its own set of variables and values. You could use the "single_client" mode where only one state exists, and each user has the same state. However, users will have the same view and interaction with the application. Three solutions:
Moreover, the concept of shared variables will be present in the next release for 3.0. It will be released in early october. Thank you for considering Taipy, and we wish you the best in your project. If you have any further questions, please don't hesitate to ask. |
Beta Was this translation helpful? Give feedback.
Hi,
Thank you for your kind words and for considering Taipy for your project. We would happily provide insights into how Taipy handles state management and whether it aligns with your requirements.
Taipy offers a way to execute a function periodically. Using long callbacks, you are able to call a function with a frequency and execute functions depending on what time it is. We could provide more code to satisfy your needs.
Taipy also has a built-in data and pipeline management system that allows you to manage your tasks and data quickly and efficiently. It is referred to as Taipy Core in the documentation, and we might add a CRON directly to it in the future.
Regarding "state" management, …