Pattern:
Client-Dispatcher-Server


Author

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

Intent

"The Client-Dispatcher-Server design pattern introduces an intermediate layer between clients and servers, the dispatcher component. It provides location transparency by means of a name service, and hides the details of the establishment of the communication connection between clients and servers." (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

Provide a dispatcher component to act as an intermediate layer between clients and servers. The dispatcher implements a name service that allows clients to refer to servers by names instead of physical locations, thus providing location transparency. In addition, the dispatcher is responsible for establishing the communication channel between a client and a server. Add servers to the application that provides services to other components. Each server is uniquely identified by its name and is connected to clients by the dispatcher. Clients rely on the dispatcher to locate a particular server and to establish a communication link with the server. In contrast to traditional Client-Server computing, the roles of clients and servers can change dynamically. 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: Remote Procedure Calls (RPC) as implemented by Sun is based upon the principles of this design pattern. RPC implements a combination of the variants Distributed Dispatchers and Client-Dispatcher-Server with communication managed by clients. (Sun Microsystems, Inc., Sun OS Documentation Tools, Formatting Documents, March, 1990.) The OMG CORBA (Common Object Request Broker Architecture) specification uses the principles of this pattern for refining and instantiating the Broker architectural pattern. (Object Management Group, The Common Object Request Broker: Architecture and Specification, OMG Document Number 91.12.1, Revision 1.1, 1992.)

See Also

Forwarder-Receiver pattern

Thumbnail

Keywords

Forwarder-Receiver pattern, Client-Dispatcher-Server pattern, Buschmann patterns, design patterns, location transparency, name service, intermediate layer, communication (client, server), layer

Business Domains

any system integrated with multiple, disparate systemsany system requiring local or distributed access to objectsany system that is distributed and possibly heterogeneous with independent cooperating components

Problem Forces

components may be distributed across networkscomponents should be able to access services provided by others through remote, location-transparent service invocationscomponents should be independent of communication mechanismneed a structure for distributed, de-coupled components

Benefits

exchangeability of serversfault tolerancelocation and migration transparencylocation transparency

Liabilities

complexity of design and implementationrestricted efficiencysensitivity to change in the interfaces

Implementation Files

Simple implmentation of the pattern - Server. Server.javaSimple implmentation of the pattern - Dispatcher. Dispatcher.javaSimple implmentation of the pattern - Client. Client.javaSimple implmentation of the pattern. clientdispserv.h



Generated on Fri Oct 20 10:40:13 GMT+02:00 2000 by Framework Studio