ASP.NET 4.0 - Reference Worker - Best Practice

I implemented several different types of background workers running under ASP.NET, but I wondered which approach is recommended / best suited.

In the data store (in this case mongo db), I have a queue of actions that I need to process.

The queue will grow depending on certain actions in an ASP.NET MVC application.

I want to run a background thread / worker thread that continuously processes these queued items.

Is it as simple as starting a background worker in an application launch event or running it on a timer?

early

Sam

+6
source share
2 answers

I use http://quartznet.sourceforge.net/index.html to plan work and have had great luck with it.

+2
source

I think the best answer is an article from Haacked.

The dangers of implementing repetitive background tasks in ASP.NET

In conclusion, IIS is a request-driven web server. This means that if no one gets to your site, nothing will happen. You can get around it, but if you need reliable background tasks, the recommended approach is the Windows service.

+1
source

Source: https://habr.com/ru/post/910645/


All Articles