Isaac Levin
Isaac Levin

Reputation: 2899

Creating separate process from web application request

A client came to me with a request to have a web app that does a lot of processing in the backend (reads from a file, writes to a web service). My question is that since this "process" (when the user clicks 'Go') may take hours, how do I make it so the processing continues after the user closes the web page? Please let me know if this does not make any sense and I can give more information. Any help would be greatly appreciated, thanks!

Upvotes: 3

Views: 441

Answers (3)

user106701
user106701

Reputation: 175

This is, basically, a "batch job" requirement, and that's how I suggest that you approach it.

The client would use the web-page, not to perform the work, but rather to manage the list of batch jobs that are performing the work .. scheduling them, starting or stopping them, viewing their status and current output, and so on. (Yup, just like they did it in the 1970's, but without "//FOOBAR JOB (123,456)" ... thank god.

The user goes to the web-page and enters a request. A back-end service process on the host (the batch job manager...) now starts the job, perhaps on one computer; perhaps on several at a time. The user can, meanwhile, log off the web-site and do whatever he pleases. Then, he can come back at any time, go back to whatever the job-monitoring web page may be, and see how things are going. Stop the job, suspend/resume, what have you.

There are lots of batch-job monitoring tools out there already, for all sorts of environments, both free and commercial. So, it's not like you have to build all this stuff; you merely have to identify what off-the-shelf package works best for you and for your client.

Upvotes: 1

NoWar
NoWar

Reputation: 37633

You have to create MS Windows Service for it.

You have provide for that Service some database table which client is going to use by your Website functionality.

Upvotes: 1

Sunny Milenov
Sunny Milenov

Reputation: 22310

The best possible solution will be to do the work in a windows service, and use your web app just to trigger the processing.

Upvotes: 0

Related Questions