I'm working on a simple boardgame and I want to provide a web interface (currently trying flask, but django would also be an option). Users will send HTTP requests (or ajax) for the game actions, which will be processed using view functions. These game actions (view functions) will alter the game state data that is maintained on the server.
Now my question is, how should I implement the game state data? I could store this in a database and access (get/set) the database in any view function call (game action). But this may be heavy on the database? I searched online and learned that I can't use global variables because they aren't shared between multiple server threads/instances. Using session storage also won't work because the game state is shared between multiple users (sessions).