I am totally new to this exciting world of programming and I am hoping it's just my inexperience that's to blame for not solving this myself:
Problem statement: My app created with flask framework, deployed on heroku has variables (stored in flask-session), which sometimes revert back to older states after being updated, at other times they don't get updated. My assumption is this has to do with distributed servers, which serve the variables at different states. I have tested this extensively locally on my computer and this issue never pops up, this only occurs when deployed.
How do I go about solving this issue please? I don't know what the exact problem maybe. I hope I have framed this question correctly to be helped. I will be in the comments to recieve any feedback to improve my question and to get an answer. thanks.
Further information: I developed a quiz app which; for each question, on the back end it queries a database then pushes this info to the front end where the user selects an answer, javascript lowers the number of lives or increases the score (depending on right or wrong answer) this lives and score info is passed to the back end and stored in "sessions". My 1st problem is; the lives and scores values don't update sometimes at other times it updates then it reverts back to previous states. My second problem; is the questions also repeat sometimes when the lives and scores variables states don't change.
Thanks in advance for your help.