- User issues a POST request.
- The server performs heavy calculations on the submitted data.
- If we treat the request as usual, we will reach a timeout.
- mvn package
- java -jar target/dependency/jetty-runner.jar target/*.war
- Go to http://heavywork.herokuapp.com/
- Enter any number (for example, 100) and press Submit
- The request is sent to the server
- Server starts to emulate a heavy task (it will be executing somewhere around the number of seconds that you entered)
- The user immediately gets the reponse and the task is executed asynchronously
- AJAX requests start to poll the server and get information about task's progress
- When the task is finished, some result is shown to the user