Search code examples
wcfiiswindows-servicescom+

Best host on Windows for UI-less processes


We're planning a system running on Windows/.Net 3.5 that has a number of "services" that need to run in the background. Some will be active all of the time, but some will only be called occassionally and can be stood-up on demand.

As far as I can see, my options are:

  • Windows Services - always running(?)
  • IIS hosted something - called on demand
  • COM+/ .Net Enterprise Sevices - most complex option, but most powerful?

Distributed transactions is not a requirement, these are mainly computation engines, rather than transaction processors.

Does anyone have any experience of working with all of these and what further pros & cons can be claimed for each technology?

EDIT

Is suppose there are multiple ways of hosting code in IIS, web services, WCF (as pointed out below), any others? Relative pros/cons?


Solution

  • WCF feels like the right way to go. There are still many choices to make. WCF provides a number of communication mechanisms and hosting environments: WCF combines the following technologies under one set of APIs- ASMX; WSE; Remoting; COM+; MSMQ. So for instance you can use persistent messages from MSMQ for occassionaly connected clients or standard XML encoding SOAP messages over an HTTP transport layer. You can also use new features in 3.5 like binary encoding of XML or JSON encoding over HTTP.

    Hosting environments include: Console applications Windows services WCF services inside IIS 7.0 and on Windows Vista or Windows Server 2008 you can use WAS (Windows Activation Services) to host WCF services.

    Different hosting environments have pros and cons. I suggest you look at MSDN for more details (e.g. http://msdn.microsoft.com/en-us/library/bb332338.aspx).

    Because WCF encompasses a lot of functionality it is more difficult to learn than any one of the technologies it replaces. I still think it pays for itself in the long run.