ASP.NET 4.0-背景工人 - 最佳实践 [英] ASP.NET 4.0- Background worker - best practice
问题描述
我实现了几种不同类型的ASP.NET下运行背景工人,但想知道是什么建议/最佳实践方法可能。
I've implemented a few different types of background workers running under ASP.NET but wondered what the recommended / best practice approach might be.
在一个数据存储装置(在此情况下一个蒙戈分贝)我有我需要处理动作的队列。
In a data store (in this case a mongo db) I have a queue of actions I need to process.
队列将取决于ASP.NET MVC应用程序中的某些动作成长。
The queue will grow depending upon certain actions within the ASP.NET MVC app.
我要开始一个后台线程/工作线程,不断地处理这些排队的项目。
I want to start a background thread / worker thread that continuously processes these queued items.
是它作为蹬掉在应用程序的启动事件后台工作那样简单,还是应在计时器上做了什么?
Is it as simple as kicking off a background worker in the app's start event, or should it be done on a timer?
在此先感谢
SAM
推荐答案
我使用的http:// quartznet。 sourceforge.net/index.html~~V 作业调度和与它有很大的运气。
I use http://quartznet.sourceforge.net/index.html for job scheduling and have had great luck with it.
这篇关于ASP.NET 4.0-背景工人 - 最佳实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!