Transport Interfaces Programming Guide

The Client-Server Model

The client-server model is a common method of implementing distributed applications. Figure 1-1 shows a typical networked environment where different services are provided and used by client and server processes.

Figure 1-1 Client-Server Model

Graphic

A server is a process that provides a service that can be used by other processes. Servers accept requests, perform their service, and return the results to the requester. Some examples of servers are:

A server process normally listens at a well-known address for service requests. When a request is received, the server is unblocked and processes the client's request. Multiple servers can offer the same service, and they execute on the same machine or on multiple machines. It is common to replicate copies of a given server onto physically independent machines to increase reliability or improve performance. If a machine's primary purpose is to support a particular server program, the term "server" can be applied to the machine as well as to the server program. Thus, you hear statements such as "Mosey is our mail server."

A client is a process that makes use of a service, or services, provided by other processes and waits for a response. An individual system might be both a client and a server for different services, or even for the same service. For example, a print server receives print requests from a client, but might need to issue a client request to a file server to access a file.