.NET Development
Distributed Systems
Gravatar is a globally recognized avatar based on your email address. Distributed Systems
  Daniel
  All
  May 24, 2017 @ 10:21am

I was just reading a post on this site which referenced an article Use IIS Application Initialization. I'm not really big on writing distribute systems, and I have some ideas about some projects that should be rewritten using distributed systems properly, but I have no idea about how to do it. Are there any defacto methods for having servers communicate with one another? When should we use iis vs a windows service? Should we use SignalR on a client web page to delegate tasks to servers and relay information everywhere?? It's just this article sparked some questions for me that I've been curious about.

-Confused

Gravatar is a globally recognized avatar based on your email address. re: Distributed Systems
  Rick Strahl
  Daniel
  May 24, 2017 @ 10:46am

If you're already using a Web site and the service is essentially an adjunct to the Web site it makes sense to integrate the service behavior into IIS.

If the behavior you're trying to build is truly separate then a service may make more sense, but personally I often use IIS for this anyway. It's not like the Windows Service manager is reliable or has recovery features - if a service dies it dies. It doesn't do anything to improve stability or uptime or even autostart. It's really little more than an autostarted executable, while if running in IIS, the IIS Admin service actually monitors the running application and can recover crashed instance. Plus it's way easier to hotswap code on IIS than with a service which has to be shut down and restarted explicitly which means downtime.

As the article points out the biggest issue you have with IIS is covering all the ways in which the service can get unloaded and ensuring that it gets restarted. I've used IIS in this way for a number of applications and we use pinging service to ensure 100% that the service stays up and running with a ping ever few minutes.

Not sure if this is an accepted 'best practice' - but this is a pragmatic choice.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Distributed Systems
  Daniel
  Rick Strahl
  Jun 2, 2017 @ 07:00am

Hey Rick,

My humble apologies for not replying sooner. Thanks for the reply. We currently have a "system", that coordinates server tasks from console apps that drop text files all over the place. I'm sure you get the idea. I'm currently trying to figure out how to write a distributed system properly. When I know more about what I'm saying, :-), I'll post my findings.

Thanks! Dan

© 1996-2017