[Freeswitch-dev] Shadow copy for mod_managed

Michael Giagnocavo mgg at giagnocavo.net
Thu Oct 9 19:52:38 EDT 2008


Hello,

        I'm thinking of adding a ShadowCopy function to mod_managed to allow easy overwriting and reloading of managed modules. Here's the comment description for the feature. Any comments?

Shadow copy loading
The build in ShadowCopy loading for an AppDomain is nice, but it will not reload an assembly with the same path.
So when overwriting assemblies, the Load/LoadFrom doesn't help and just returns the currently loaded assembly. (LoadFile bypasses Fusion, and hence the ShadowCopy feature).
Because of this, we implement our own shadow copy loading facility.
On initial load, all files in the managed module dir are copied to the shadow dir under the "0" folder and loaded from there.
(Existing files in the shadow folder are deleted.)
When loading a new assembly after the initial load, it is copied to the shadow dir, under the current version (start at 1, go up).
Resolved dependencies are also copied over to the current version folder.

Thanks,
Michael



More information about the Freeswitch-dev mailing list