I have a WCF webservice that executes a function that could take around 10 seconds to complete.
The client can call the WCF web service asynchronously by either executing the WCF calls via a thread pool, or using the generated asynchronous methods.
However I would like to execute the functions async AS WELL as concurrently, ie many calls to the same web service to be called very shortly after each other.
So for example wcf call 1 is initiated at 00:00
wcf call 2 is initiated at 00:01, then call 3 at 00:02 etc. They should complete at 00:10 then 00:11 and 00:12.
In the above examples. The web sservice is called asynch but executed sequentially, so call 1 is executed, 10 seconds late call 2 is executed and so forth.
I have change the max connection values, but to no avail.
I notice that if I create the WCF service function as a threaded function within the web service, i get the desired effect, ie "wcf call 2 is initiated at 00:01, then call 3 at 00:02 etc. They should complete at 00:10 then 00:11 and 00:12".
But is this really the way it should be done, is there any alternatives, that are "neater"?