I am using Play Framework/Java for quite a while now, but more like a traditional web framework with blocking calls. Never had any problems with it, because it was fast enough. I am not using the “advanced features” like Async, Streams, Akka etc.
Now, I have a new task to implement, and I think I have to use Akka for it. Please advise.
So, I have to download ca. 1.500 JPGs from a web service, create thumbnails and store the original and the thumbnail in the file system. After each 10 downloaded images, I want to show the user some progress.
I did that before with Jetty and a classic servlet, hat a loop and after each 10 images I did a “response.writeln(i + " images loaded”); response.flush();" and so the user could see what is going on.
How can I do something like that with Play?
I found https://stackoverflow.com/questions/11398495/long-running-process-with-progress-bar-example-playframework-2
Should I start with that?
The code is 3 years old, I think some methods changed. Is there a newer example anywhere?
Is there a better approach?
PS: Additionally, how could I stop the download, if the user wants to stop for any reason like after downloading 200 images?