I have to create an application that will be started a few times per day (it’s non – interactive).
To operate, it needs LARGE amounts of data from the Internet (megabytes) via a rather slow connection, so the WCF service calls take quite some time.
At the same time, it needs to perform local calculations and has a sophisticated initialization process.
So, what I want to do is to create a workflow that asynchronously fetches the data (takes a few minutes) while already initializing / calculating locally.
Is there a way to accomplish this?
You could use the BackgroundWorker component for each async operation – one for the calculations and one for the data download.
My suggestion would be to use one thread for each operation. After you start each thread, call thread.Join() one each thread to wait for each thread to finish.
e.g.