I did it in a large project for the same reasons as you. However I didn't
use any magic proxy bullets. Server B is simply both a remoting server and a
remoting client. It passes object forward by invoking the identical named
methods on server C&D using the objects if receives. Likewise it returns the
object it was supposed to from Server C&D to Server A. In some cases it was
necessary for Server B to do some additional work and call a different
remote method and it did so. The delay time for small objects was not
noticeable to an interactive client waiting for something.
Wray
It is in the 10's of lines of code, just a method matching method
Thanks Wray, that's interesting. Let me see if I understand you correctly.
For every class on ServerC and ServerD that I want to expose remotely, I
need to write a wrapper class. The wrapper class is just a simple
pass-through for every method in the class. I install the wrapper class on
ServerB. I configure ServerB to be a server of this wrapper class, and a
client of the real class. The client code (running on ServerA) will need to
change to create instances of the wrapper class. The client will be
configured to remote this class to ServerB.
So, for example, when the client creates an instance of ClassCWrapper this
will be remoted to ServerB. An instance of ClassCWrapper is created on
ServerB. In turn this creates an instance of ClassC. This is remoted to
ServerC, which creates an instance of ClassC. The object reference to this
ClassC instance is passed back to ServerB. The object reference to the
ClassCWrapper is passed back to the client. The client can now make method
calls on this object reference, which will be remoted to ServerB, which will
in turn call methods on its object reference, which will be remoted to
ServerC.
Phew!! Hopefully I got all that right. I understand how this could work,
and it is an acceptable solution in my case. I am still hoping to find some
way to remove the wrapper class from the solution altogether. Ideally I
want ServerB to be a remoting server for ClassC as well as a remoting client
for ClassC. This would mean that ServerB.exe wouldn't need to have ANY
knowledge of the classes it is serving (other that in its .config file). I
tried configuring it that way but couldn't get it to work.
Thanks for your reply
Peter
> I did it in a large project for the same reasons as you. However I didn't
> use any magic proxy bullets. Server B is simply both a remoting server and a
[quoted text clipped - 36 lines]
> >
> > Peter Evans.