Problems, when using a separate module to keep internal state?


for my application, multi-user functionality is not a requirement. Each user will start their own Dash application!!!

In order to avoid unnecessary traffic between frontend and backend, I would like to store some computed data in the backend python code, so that all neccessary components can access it. As I realized, that Dash starts several workers in parallel, I created a separate module without any dash components, which I use to store my data in: (here are all my data and intermediate steps) (dash component with access to (dash component with access to

The should therefore have one ground truth for all other components.

Right now, it works as expected. Are there any problems with this solution, that I don’t see yet?

The main reason, why I don’t want to transfer everything via app.callback to the frontend is, because it is a pandas-dataframe-groupby result, which does not serialize by default and it is pretty big. Therefore, I want to store it solely in the backend and perform some computations on it just on request.