Half Object Plus Protocol

HalfObjectPlusProtocol was published in volume 1 of PatternLanguagesOfProgramDesign by GerardMeszaros. Its synopsis is:

Divide an object which needs to be accessed from more than one address space into two interdependent half-objects (one in each address space) with a protocol between them. In each address space, implement whatever functionality is required to interact efficiently with the other objects in that address space. (This may result in duplicated functionality, i.e., implemented in both address spaces.) Define the protocol between the two half-objects so that it co-ordinates the activities of the two half-objects and carries the essential information that needs to be passed between the address spaces.

Patterns which solve the same problem include RemoteProxy (which delegates all requests back to a single site) and CachingProxy? (which caches the results of some requests to reduce delays and network traffic.) RemoteProcedureCall solves the same problem in a different way; it exposes the fact that the target object is in a different address space to the client, which results in client software which "knows" about the distributed nature of the application.

The pattern includes figures that show flow of control traces that make the distinction between the various alternatives clear. The following link will retrieve the text of the pattern, but not the figures.

http://www.bell-labs.com/topic/books/PLoPD1/manuscripts/HalfObjectPlusProtocol.html


For an instance of this pattern see IBM's UltraLightweightClient (http://www.software.ibm.com/ad/smalltalk/about/ulcfact.html) -- ThomasMaeder

They've also (just now) done one of these for their VisualAge for Java environment. It's aimed at reducing the hideous bloat of Java applications and applets (particularly with full GUIs). See http://www.software.ibm.com/ad/r/99enews9/vajulc/. -- RichardEmerson


The problem with caching is how to invalidate the cache. Data ages; machines go down. The framework for ensuring cache consistency can be very complex.


I'm convinced that there's a pattern language here. Let's hack at it at HoppPatternLanguage.


CategoryPattern

EditText of this page (last edited July 9, 2003) or FindPage with title or text search