|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Dynamic updates of remote object without service interruptionI need some help regarding the mecanism to put in place to be able to dynamically update a remote object when the assembly where it is defined is modified, and this whitout having service interruption. Basically what I'm missing is how do we re-expose a remote object when assembly has changed, and this without any interruption to the callers. I have an application that exposes a remoting object (Well known service - Singleton or singlecall). It works as follows: 1. Console application starts 2. Console application creates an application domain 3. Shadow copy is enabled on this application domain (so that the assembly can be changed, it is not locked) 4. Register a HTTP channel in this appDomain. 5. It then loads a specific assembly in the newly created appDomain and register a well known service using a type found in this assembly. 6. Use FileWatcher to be notified on assembly file change. Later, the assembly is modified. i now want to restart the service using the new assembly. Currently, i just unload the appDomain, then redo step 2 to step 5. Problem is that there is a short time where the service becomes un-available and where requests are interrupted. Questions: How can i restart the service without having service interruption. The idea is to process current request with old application domain, and forward new request to new application domain. Then once all old requests have been processed, the old application domain can be safely unloaded. I think i may have to use channel sink but I'm not sure. How can i achieve this ? I know ASP.NET is using this mecanism extensively to handle dynamic assembly changes. Any help, ideas, code samples, etc will be greatly appreciated |
|||||||||||||||||||||||