My simulation application will be using plug-ins to provide the simulation algorithms and data structures for the storage of the simulation data. The application consists of two parts. First is the host application which provides the UI (either as WPF UI or as plug-in to a CAD application). This application handles all interaction with the user but does not perform any of the simulation calculations, neither does it store any of the simulation data. The second part is the data application which performs the simulation calculations. The data application does not have any way for the user to interact with it directly, all input is provided via a connection with the host (either via named pipe if both are on the same machine or via TCP if they are on different machines). This approach allows distributed computing via a single host with multiple data applications.
The data application is provided with the data storage methods, simulation algorithms etc. via one or more plug-ins so that it is easy to add new capabilities. In order for this to work the plan is to:
For all of this to work I think I will have to:
I would like to do as little work as possible and so I had a look at some of the available plug-in systems for .NET. From the looks of it MEF seems to be the most promising candidate. I have read up on the architecture and abilities of MEF but I am still a bit in the dark as to where I should be focussing my energy. So my question is which parts of MEF will have to be customized in order to make MEF work with my planned approach?
It turns out that MEF is missing certain bits that are required for the delay loading of plug-in assemblies, however it is possible to use some parts of MEF in the plug-in part of the application.