I have inherited a system - in which part of it works like this:
User submits a request -->
Web service is called on the server -->
The web service does some processing and then kicks off a separate process (an executable) to do some time-consuming tasks -->
the web service then tells a Windows service that the process has begun -->
This Windows service then checks every few seconds to see if the executable has finished its task (a flag on the DB) -->
When the relevant flag in the database is set, the windows service does some other stuff.
Would it be better to have the time-consuming stuff all done in the web service - in a background thread, and have the thread callback when it has finished?
If this is the route to go - is it worth changing an existing system that 'works'.
Opinions appreciated.
User submits a request -->
Web service is called on the server -->
The web service does some processing and then kicks off a separate process (an executable) to do some time-consuming tasks -->
the web service then tells a Windows service that the process has begun -->
This Windows service then checks every few seconds to see if the executable has finished its task (a flag on the DB) -->
When the relevant flag in the database is set, the windows service does some other stuff.
Would it be better to have the time-consuming stuff all done in the web service - in a background thread, and have the thread callback when it has finished?
If this is the route to go - is it worth changing an existing system that 'works'.
Opinions appreciated.