.NET Windows Service - Architectural Decisions

点点圈 提交于 2019-12-04 16:12:27

Your description sounds a lot like the thing I wrote about 2 years ago. A windows service which hosts addins and runs them in multithreaded environment. The architecture used is the .NET addin pipeline introduced in .NET 3.5 (System.AddIn-namespace). It works like a charm as I also integrated live/hot updates. It's so easy to implement new addins and just plug them in whenever I like. So I really recommend using this addin stuff.

See http://msdn.microsoft.com/en-us/library/cc175292.aspx for a quickstart.

I've done something similar for our background services, there's basically a ServiceHost and "Servlets" which are loaded via appdomains so they don't impact each other.

Why a service? Pretty much none of the things you do- except the 24/7 task for imports - are something I would do as a service.

I would use:

  • Either command line programs that get regularly scheduled, especially on the daily / weekly tasks
  • Or use SSIS and SQL Scheduler to schedule something.

The only thing that may justify a service is the 24/7 XML import - unless you can get away starting it, for example, every 5 minutes.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!