In my Play! app, I have a button that the user can click, which goes to a controller that triggers a long calculation. After the long computation is done, a result page shows (where the user can further click to download whatever he wants). Now, I followed this instruction (https://www.playframework.com/documentation/2.8.x/JavaAkka#Executing-a-block-of-code-asynchronously) and successfully made this long calculation run asynchronously.
However, in order to let the result page show, a user will have to wait for the calculation until it is done - if he clicks any other button during the calculation, the application will simply go to the result page of the clicked button, and the result page from the long calculation will never show, even after the backend async operation is done.
So this still feels like a blocking operation since the user has to wait for the backend work to be done. Is there a way to correct this? For example, while the backend operation is running asynchronously, the user is free to click any button and do anything else, but when the result is available, he will be taken to the result page no matter where he is at, or, he is given some alert telling him the result is now ready to view?
Many thanks for any hint you can give … thanks!