You have a challenging situation indeed. Suppose you move the "get data from equipment" code (I don't know if it matters how this is done) into your main routine, have the main routine pass that data to the plugin assembly, and then either (a) let the plugin do any replying itself, if that's feasible; or (b) pass the info back to the main routine so the main routine can do any necessary replying.
Then, the main routine can detect that a new plugin should be used ASAP, load it, and start sending info to the new plugin rather than the old one. Once all the outstanding requests to the old plugin (I presume you're making asynch calls to the plugin) have been handled, you can unload the old plugin. The key, it seems to me, is to separate the "receive data and call plugin" logic (in the main routine that you hope will never [again] need to change) from the "process the data" logic (in a plugin, so it can be changed at will). That's what would happen if you used scripting for the "process the data" logic. Unless you might use many many plugins between shutdowns, you might not even need to put each one in its own AppDomain (making things a lot easier). Even though they won't really "unload", eventually the unused code will not matter much, other than taking up _virtual_ memory space. But I can understand wanting to put each plugin in its own AppDomain to let them fully unload. Is the issue that it's hard to pass the info from the equipment across AppDomain boundaries to the plugin? Depending on what form the info takes, that could be either easy or hard... Good luck! At 08:35 PM 12/21/2005, peter lin wrote >Dear sir, > Thank you for your quick response and sorry for causing the confuse. >We developed a material transferring control system(MCS) that operate in >TFT/Semiconductor FAB clean room and need to operate 24 hours per day whole >year exceprt during PM. >Our customer need to request a shutdown for bug fix from another manufacture >department who usually reluctantly want to stop this system because it will >stop the whole line and the equipment will be idle during this bug fixed >operation.( The saft operating buffer time usually needs 1:00 hour.) The >plugin assembliy needs to handle event sending from transferring >equipment and do the normal or exception handle(such as the carrier id >NG,mismatch or duplication handle) .It's from this part that new >requirement coming out and we need to add some rule check handling or fix >some codes in the assembly and yes, fix bug too. >[snip] J. Merrill / Analytical Software Corp =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
