Remote Proxy

Intent: Used to hide the communication mechanisms between remote objects.

RemoteProxy is a special case of HandleBodyPattern, in which the handle or "stub" resides on a client machine, and the body or "skeleton" (also called "scion") resides on a remote machine.

This mechanism is used by many object-based distributed systems, for example CORBA [CommonObjectRequestBrokerArchitecture], RMI [RemoteMethodInvocation], DCOM [DistributedCom], etc.

RemoteProxy is an application of the ProxyPattern described in the GangOfFour DesignPatternsBook. As the pattern gets a mere two lines in the book, there aren't many details of it and it is a matter of conjecture as to what implementations qualify to be examples of the pattern.

CORBA automatically generates proxy classes which allow invocations of remote interfaces. These classes provide essentially no value add: all you can do is invoke the methods of the remote object.

The HalfObjectPlusProtocol pattern advocates implementing an object as two parts, separated by a protocol to keep the parts in sync. The difference between this and what CORBA does is that CORBA gives you the protocol for free (IIOP), and HOPP lets you make the proxy smarter than the one CORBA generates.

BagOfJumpingBeans claims that some objects which look like they should be a RemoteProxy should not be: the object can be copied and synchronization neglected. In this case, the protocol is removed altogether and the client end (formerly the proxy) is smart enough to be usable by itself.

-- JohnFarrell

View edit of January 16, 2006 or FindPage with title or text search