I think I need a Windows Service

I plant to make my application support multiple instances and want another exectuable program to perform certain decisions for the group of instances, and think a Windows Service is what I need. I'd like each instance to report into the Service every few seconds, in a standard interval, to report certain statistics. Then every 15 seconds or so I'd like the Service to perform some optimization calculations, then pass instructions back to each instance.

From what I know about Windows Services, they are perfect for this task. Am I right?

Is there any way for the service to communicate back to the instance? Or must the instance simply poll the Service to find out it's next instructions?

I have used Web Services and assume they are similar. Please let me know and give me some general ideas about the pros and cons of Windows Services.

Thanks,
newbieweb

newbiewebSr. Software EngineerAsked:
Who is Participating?
 
Bob LearnedConnect With a Mentor Commented:
Hmmm...web service or Windows service...they both serve a similar purpose, and they are both suited for the job.  For me, that decision is based on what is easy to implement and what is allowed.  Our company frowns on Windows services, for some reason, but not web services, so it tends to funnel decisions down to web services every time.  The decision has a few weighted factors that I can think of right off the top of my head:

1) Are you crossing any network boundaries (firewall, proxy, etc.)?  If you are, a web service would be a better choice.

2) Do you have a simple network plan, that doesn't add a lot of complexity?  If you do, then a Windows service would be easy to implement.

3) What throughput are you looking for?  Windows services can handle higher throughputs, but load balancers, and IIS application pools can make it better for web services.

4) How important is troubleshooting and maintenance.  I feel that Windows services are more difficult, than web services to maintain.
0
 
newbiewebSr. Software EngineerAuthor Commented:
Thanks for the feedback. Web services are known quantities, since I've worked with them. And I later realized I may need to be accessable to clients via the web that makes web services the clear choice.

Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.