I have been given the task to write a technical specification (and later implement) a system that will be build on a few sub-modules. The sub-modules will be developed partly in parallel so I would really like to avoid restarting the whole system each time a plugin is added or updated. Since I have already used Simple Injector in another project I plan to use it for IoC in each sub-module. Instead of introducing MEF (Managed Extensibility Framework) or MAF (Managed AddIn Framework) in the core binding the modules together, my plan is to see if Simple Injector can be used for handling the modules as well.
My plan is to use a FileSystemWatcher to watch a plugin directory and when a change is detected either have Simple Injector do it's thing or perhaps roll my own solution. I have read the discussion here but I believe my use case is different.
Requirements:
To be able to dynamically load/reload assemblies I plan on running each module in a separate AppDomain.
Is this possible using Simple Injector? Any other thoughts? Perhaps something I haven't thought about.
So, based on the correspondence with Steven I decided to look at alternatives and talk to my CTO. This resulted in a completely different architecture (microservices - probably implemented as Azure Functions) communicating through a message bus (Azure Service Bus). This complies with all the requirements and (using Azure Functions) ensures that we only pay for computing power when events arises that should be handled.