Long running stateful service in .NET

Posted by Asaf R on Stack Overflow See other posts from Stack Overflow or by Asaf R
Published on 2010-03-11T16:56:58Z Indexed on 2010/03/11 17:19 UTC
Read the original article Hit count: 455

Filed under:
|
|
|
|

Hi,

I need to create a service in .NET that maintains (inner) state in-memory, spawns multiple threads and is generally long-running. There are a lot options -

  • Good-old Windows Service
  • Windows Communication Services
  • Windows Workflow Foundation

I really don't know which to choose. Most of the functionality is in a library used by this service, so the service itself is rather simple.

On one hand, it's important the service host is as close to "simply working" as possible, which excludes Windows Service. On the other hand, it's important that the service is not taken down by the host just because there's no external activity, which makes WCF kind o' "scary". As for WF, it's strongest selling point is the ability to create processes as, um..., workflows, which is something I don't need nor want.

To sum it up, the plethora of Microsoft technologies got me a bit confused.

I'd appreciate help regarding the pros and cons of each solution (or other's I've failed to mention) for the problem of a stateful, long running service in .NET

Thanks,
Asaf

P.S.,
I'm using .NET 4.

EDIT:

  • What I mean by the host "simply working" is, for example, that the service I create be reactivated if it crashes.
  • I guess the reason for this question is that I've created Windows Services in the past (I think it was in plain C++ with Win32 API), and I don't want to miss out on something simpler if there's is such as thing.

Thanks for all the replies thus far!
Asaf.

© Stack Overflow or respective owner

Related posts about .NET

Related posts about .net-4.0