I'm learning about remoting by doing small remoting-based projects and also trying to enforce Good Practices while doing so to avoid my usual habit of developing Bad Habits.
There is a service that makes use of user-created plugins. Each plugin is isolated in its own appdomain. Additionally, there is a client application that connects to and interacts with the service.
There are channels for service-client communication and service-plugin communication, but nothing to facilitate plugin-client communication. As such, any object created by a plugin must be wrapped in a service-defined object before it can go through to the client (otherwise there is an exception due to lack of channel sinks).
If this makes sense, my question is this: should I continue this pattern or should I be creating channels between the plugin and client appdomains to allow plugin-instantiated objects to go to the client application?
Thanks for any education on the subject!
I can't give you definite answer without hearing more about your application, so while the question is arguably subjective, here is my subjective reply:
It seems reasonable that the server aggregates connections to plugins, and the client only maintains a single channel to the server. This simplifies and consolidates the solution in a number of ways:
On the other side, it might be a hassle to envelope every plugin-object in a server-object.