The plan is to develop generic solution for long running task initiated in web site by users such as:
1. upload large file and do some custom processing and then insert in the database.
2. export large amount of data
But we do not want to run these tasks on web servers and instead run on dedicated other sever. I have a couple of following solutions but looking for suggestion on these solutions or a new option.
-
Web site calls WCF service on other server (one-way operations / fire-forget). WCF service has all the information to process request and task will run in WCF service.
-
Window service but not sure how Window service will start the job as soon as possible as we do not want any delay between user submitted the form and process start time. Need some kind of flag for Window service to start.
1
Actually, one way to host WCF services is as a windows services. The difference is how customized those services can be.
The windows service can keep listening a port and response at real time when you use them. Actually a service can have several clients connected at the same time. for example IIS.
To me, seems to be easier the WCF fire and forget option; less coding for the same result.