Pattern:
Forwarder-Receiver


Author

Frank Buschmann, Regine Meunier, Hans Rohnert, Peter Sommerlad, and Michael Stal

Intent

"The Forwarder-Receiver design pattern provides transparent interprocess communication for software systems with a peer-to-peer interaction model. It introduces forwarders and receivers to decouple peers from the underlying communication mechanisms." (Buschmann, F., R. Meunier, H. Rohnert, P. Sommerlad, M. Stal. Pattern-Oriented Software Architecture: A System Of Patterns. West Sussex, England: John Wiley & Sons Ltd., 1996)

Motivation

Distributed peers collaborate to solve a particular problem. A peer may act as a client, requesting services, as a server, providing services, or both. The details of the underlying IPC mechanism for sending or receiving messages are hidden from the peers by encapsulating all system-specific functionality into separate components. Examples of such functionality are the mapping of names to physical locations, the establishment of communication channels, or the marshaling and unmarshaling of messages. For a more detailed Motivation description for this pattern see: Buschmann, F., R. Meunier, H. Rohnert, P. Sommerlad, and M. Stal. Pattern-Oriented Software Architecture: A System Of Patterns. West Sussex, England: John Wiley & Sons Ltd., 1996.

Known Uses

This pattern has been used on the following systems: TASC, a software development toolkit for factory automation systems, supports the implementation of Forwarder-Receiver structures within distributed applications. (Siemens AG, Toolkit for Autonomous Software Components Communication, Systemdokumentation, internal document, 1991.)\ Part of the REBOOT project uses Forwarder-Receiver structures to facilitate an efficient IPC in the material flow control software for flexible manufacturing. (Karlsson, E-A. (Ed), Software Reuse - A Holistic Approach, John Wiley & Sons, 1995.) ATM-P implements the IPC between statically-distributed components using the Forwarder-Receiver pattern. (Siemens AG, ATM-P: Komplexspezifikation, internal document, 1993.) In the Smalltalk environment BrouHaHa, the Forwarder-Receiver pattern is used to implement interprocess communication. (Steel, D., Distributed Object Oriented Programming: Mechanisms & Experience, Proceedings of TOOLS USA 91, pp. 27-35, Prentice Hall, 1991.)

See Also

Client-Dispatcher-Server pattern

Thumbnail

Keywords

Forwarder-Receiver pattern, Client-Dispatcher-Server pattern, Buschmann patterns, design patterns, communication (peer-to-peer), distributed peers

Business Domains

any system integrated with multiple, disparate systemsany system that is distributed and possibly heterogeneous with independent cooperating componentssystems requiring peer-to-peer communication

Problem Forces

components need to communicatecomponents should be able to access services provided by others through remote, location-transparent service invocationscomponents should be independent of communication mechanism

Benefits

efficient inter-process communicationencapsulation of IPC facilitiesprovides weak coupling between clients and subsystems

Liabilities

no support for flexible re-configuration of components

Implementation Files

Simple implementation of the pattern - Receiver. Receiver.javaSimple implementation of the pattern - Peer. Peer.javaSimple implementation of the pattern - Forwarder. Forwarder.javaSimple implementation of the pattern. forwarder.h



Generated on Fri Oct 20 11:11:17 GMT+02:00 2000 by Framework Studio