I've made an app using Flask, which is currently hosted on Pythonanywhere. The app has a backend process that is initiated by the user. When the user initiates the process, some data is sent to Flask via jQuery AJAX, which is then processed, and the results are returned. This process can take between a few seconds and up to around a minute, so I have a 'please wait' modal on the front end while waiting for the AJAX response from the backend.
Is there a way I can send interim data to the front end, to update the 'please wait' modal, while the backend process is doing its thing? The backend process performs iterations until it is satisfied. So ideally I would like to be able to display to the user how many iterations it has performed.
I asked this question on stack overflow, which led me to find 'Socket IO' for Flask. So I went ahead and implemented it using that (which worked on my local dev environment), only to find that it's not supported on Pythonanywhere.
Are there any other methods I could use to send interim data from the backend, that are supported by Pythonanywhere?
Thanks, Hugh.