I’m maintaining a large application that makes heavy use of StructureMap to load it’s components. I’m trying to split the components up so they can run on different machines, connected via network. They already run in different threads, but within the same process (making use of a single StructureMap container).
I’m not sure how to do this. Is it possible to have StructureMap automatically create a proxy for all components and use them over network instead of locally? What changes to the components are needed to make them distributable?
Interesting! Theoretically I guess it is possible, the real underlying question is if you really want to do so, we are talking about a major architectural change.
Disclaimer: I don’t know how familiar you are with WCF, I’ll attempt to explain very roughly how I imagine it being possible, but consider that if we are talking about this sort of communication over a network you want to use WCF.
While it sounds quite straightforward, a relevant complexity is hiding behind these steps. To name a few potential issues off the top of my head: which components are you going to wrap into services? How easy is wrapping them going to be? Where are you going to host them, how? What about security? Does your logging mechanism need to be adjusted?