Saturday 15 January 2011

.net - Can I host multiple different windows services in a single windows service? -


I have a cluster of legacy windows service. All of these services have been installed on multiple servers, but for few reasons the service is low May be, such as memory leak, file system exception and SQL connection exceptions, so we have to remotely reset the server and check the status of daily service. However the restore operation has been added. But it is still not strong, controllable.

The solution I want to find is to integrate all existing services into a single window service, this host service can run sub-services and schedule them and monitor them, when errors , Can restore my host service, log the error into the database, and send email to the concerned people. The solution can also do to schedule a service, such as a stop, set it from time to time, so I want to know that in a way I do not need to modify the assembly of the window service that was received from the servicebase. And integrates them into my framework. I thought that the OS can host the sub service, there is a way that my host service or frame work can also be hosted by sub service and should also schedule them.

My ultimate goal is to serve only one window, this is my host service, without installing it in the OS, the other sub service runs under my service.

I have opened some related threads below, but they can not fit my needs:

  • When do you say that services mean that the proper services or executable services? If this is the latter, then you have complete control over it. You can create subservices as threads or processes. The big problem is killing the processes. With every new release of Windows OS, they add more security features that make it difficult to kill processes.

    Threads can be a problem, if a thread dies due to memory leaks, then it is affected by the program. The entire program may have to kill and restart themselves.

    A note of warning: Services are run as a user called "local user" You can not log in as a "local user" and even top administrators (administrator's By name), you can not kill "local users" services or processes Only "local users" can kill them.

    Have you seen shareware products such as FireDemon? They do something similar

No comments:

Post a Comment