CLIENT-SERVER MODEL
The model of arranging for one application program to wait passively for another application to intimate communication pervades so much of distributed computing that it has been given a name: the client-server model of interaction.
The terms client and server refer to the two applications involved in a communication. The application that actively initiates contact is called a client, while the application that passively waits for contact is called a server. To summarize: Network applications use a form of communication known as the client-server model. A server application waits passively for contact, while a client application initiates communication actively.
The application programs using the Internet adopt the following client-server model strategies:
An application program, called the client, running on the local machine, requests a service from another application program, called the server, running on the remote machine.

A server can provide a service for any client, not just a particular client. In other words, the client-server relationship is many-to-one. Many clients can use the services of one server.
Generally, a client program, which requests a service, should run only when it is needed. The server program, which provides a service, should run all of the time because it does not know when its service is needed.
Services needed frequently and by many users have specific client-server application programs. For example, we should have client-server application programs that allow users to access files, send e-mail and so on. For services that are most customized, we should have one generic application program that allows users to access the services available on a remote computer.
Characteristics of Clients and Servers
Although minor variations exist, most instances of client-server interaction have the same general characteristics.
In general, client software:
is an arbitrary application program that becomes a client temporarily when remote access is needed, but also performs other computation locally?
- is invoked directly by a user, and executes only for one session.
- runs locally on a user's personal computer.
- actively initiates contact with a server.
- can access multiple services as needed, but actively contacts one remote server at a time.
- does not require special hardware or a sophisticated operating system.
In contrast, server software:
- is a special purpose, privileged program dedicated to providing one server, but can handle multiple remote clients at the same time.
- is invoked automatically when a system boots, and continues to execute through many sessions.
- runs on shared computer (not on a user's personal computer). waits passively for contact from arbitrary remote clients. accepts contact from arbitrary remote clients.
- accepts contact from arbitrary clients, but offers a single service.
- requires powerful hardware and sophisticated system.
Like most application programs, a client and server use a transport protocol to communicate.

As the figure shows, a client or server application interacts directly with a transport layer protocol to establish communication and to send or receive information. The transport protocol then uses lower layer protocols to send and receive individual messages. Thus, a computer needs a complete stack of protocols to run either a client or a server.
Complex Client-Server Interactions
Some of the most interactive and useful functionalities of client-server computing recur in arbitrary interactions among clients and servers. In particular, it should be noted that:
0 A client application is not restricted to accessing a single service. A single application can first become a client of one service, and later become a client of another. The client contacts a different server (perhaps on a different computer) for each service.
0 A client application is not restricted to accessing a single server for a given service. In some services, servers running on different computers provide different information. For example, a data server might provide the current time and date for the computer on which it runs. A server on a computer in a different time zone gives a different answer. In other services, all servers provide the same information. In such cases, a client might send a request to multiple servers to improve performance. The client uses the information sent by the server that responds first.
0 A server is not restricted from performing further client-server interactionsa server for one service can become client of another. For example, a file server that needs to record the time that a file was accessed might become a client of a time-server. That is, while it is handling a request for a file, the file server sends a request to a time-server, waits for the response, then continues handling the file request.
Client-server interaction can be complex. A single client can access more than one service, a client can access servers on multiple machines, and a server for one service can become a client for other services. Designers and programmers must be careful to avoid circular dependencies among servers.
BACK |