I have a well defined service contract which exposes a bunch of methods. We have a typical service implementation of this contract which is hosted within IIS 7 along with our MVC App.
The architecture is of a typical distributed application with the interface defined in a base core library (which is re-distributable), the implementation within an independent services library and finally the MVC App exposing an end-point for the implementation(which is within the services library).
The situation now is that one of these existing service methods needs to possibly execute a logical process which can take upto 10 minutes to execute. In a normal scenario we would have considered workflow services but the interface under question is well in use, we have a suite of unit tests to test our services etc. and we really can't get away with this implementation that we have.
So my questions are -
- Is it possible to have an independent workflow which can do this long running process and call it from our WCF service?
- If it is then how do I ensure that the worker thread executing my service within IIS will stay alive for the duration for the workflow?
- Finally the client does not need to wait for a response from this service. It is a fire and forget method. Can the client call end immediately while the service kicks off a workflow and waits for it to finish?