Client-distributor-Server
When a software system uses servers distributed in the network, it must provide a means to communicate with each other. Usually, by using existing communication devices, connections between components have been established before communication occurs. However, the core functions of components should be separated from the details of the communication mechanism. The client does not need to know the location of the server, so that it can dynamically change the location of the server and provide recovery capabilities for network or server failures.
Structure
The task of the client is to execute tasks in special fields. To perform the processing task, the client accesses the operations provided by the server. Before sending a request to the server, the client requests the channel from the distributor. The client uses this channel to communicate with the server.
The server provides a set of operations for the client. It can either register itself or register with the distributor through its name and address. A server component can be on the same computer as the client or a node on the network.
The distributor can establish a communication channel between the client and the server. To achieve this, you need to retrieve the name of the server component and map the name to the physical address of the server component. The distributor uses the existing communication mechanism to establish a communication link for the server and return the communication handle to the client. If the distributor cannot start the communication link with the requested server, it notifies the client of the error.
Implementation
1) divide the application into two parts: server and client.
2) determine which communication devices are required.
3) Specify the interaction protocol between components.
4) Determine how to name the server.
5) Design and implement the distributor.
Advantages
1) The server can be exchanged.
2) location and migration transparency.
3) Reconfigure.
4) fault tolerance.
Insufficient
1) The inefficiency caused by the establishment of indirect methods and explicit connections.
2) sensitivity to changes to the distributor Component Interface.