Client-Server pattern

In the client-server architecture patterns, there are two main components: The client, which is the service requester, and the server, which is the service provider. Although both client and server may be located within the same system, they often communicate over a network on separate hardware.

The client component initiates certain interactions with the server to generate the services needed. While the client components have ports that describe the needed services, the servers have ports that describe the services they provide. Both components are linked by request/reply connectors. A classic example of this architecture pattern is the World Wide Web. The client-server pattern is also used for online applications such as file sharing and email.

Figure 1: Client-Server architecture

A simple example is online banking services. When a bank customer accesses online banking services using a web browser, the client initiates a request to the bank’s web server. In this case, the web browser is the client, accessing the bank’s web server for data using the customer’s login details. The application server interprets this data using the bank’s business logic and then provides the appropriate output to the web server.

Pros:

  • Central computing of data; all files are stored in a central location for this network. Therefore, the data, as well as the network peripherals, are centrally controlled.

Cons:

Servers in this case would be expensive to manage, create and operate the servers as the number of clients grow

The client-server model is related to the peer-to-peer architecture pattern and is often described as a subcategory of this pattern. The latter uses a decentralized system in which peers communicate with each other directly.

Leave a Comment

Your email address will not be published. Required fields are marked *