One of the first challenges you will face if you have never worked with asynchronous tasks is how to return results from an asynchronous task if you don't know when the execution will end.
This recipe shows you how this is done. AsyncResponse for the win!