I have a worker process that is executed via a Windows service (vb.net). It executes every 5 minutes and checks a “jobs” table in a database. I also have a web application (asp.net vb) that allows users to “pause” currently running jobs in the case of an error.
What is the best way for the web application to signal the Windows service to stop processing? They are running on the same machine, however if you have a suggestion for if they were running on different machines that would be great.
I would like to avoid database or filesystem calls to check a “status” during every iteration.
I have a database which stores custom info for each worker process – I could store a thread ID or process ID if it is retrievable via .Net to enable the Web application to message the service application?
You probably want to make your service a WCF server.
Then you can communicate with it from your web app or wherever is convenient. You can also provide a progress / feedback API as well as a command / control API – it’s up to you.