Client-Server

The Client-Server model is distributed application communication pattern in which applications can take one of two roles "client" and "server".

The client explicitly references the server and invokes operations on the server which may perform actions on behalf of the client as well as access or update data.  Servers typically do not know or reference clients, they simple wait for the clients to connect (authenticate) an invoke operations.

Many client-server deployments end up being centralized around one (or a few) servers. The "special" server node(s) connects simultaneously to many client nodes, as illustrated in Figure 1. For this reason one can think of Client-Server is a "many-to-one" communications architecture. 

Figure 1. Client-Server Communication

The client-server network architecture works best when information is centralized, such as in databases, transaction processing systems, and file servers. However, if information is being generated at multiple nodes, a client-server architecture requires that all information are sent to the server for later redistribution to the clients. This approach is inefficient and precludes deterministic communications, since the client does not know when new information is available. The time between when the information is available on the server, and when the client asks and receives it adds a variable latency to the system.

Example of Client-Server Communication

Ordering pizza over the phone is an example of client-server communication. Clients must know the phone number of the pizza parlor to place an order. The parlor can handle many orders without knowing ahead of time where people (clients) are located. After the order (request), the parlor asks the client where the response (pizza) should be sent. In the client-server model, each response is tied to a prior request. As a result, the response can be tailored to each request. In other words, each client makes a request (order) and each reply (pizza) is made for one specific client in mind.