The client/server model is the most commonly used model for developing distributed applications. In the client/server model, client applications request services from a server. The present chapter uses examples to describe the interaction between the client and server in more detail and also illustrates some problems which may occur when developing client/server applications, together with their solutions.
Before a service can be granted and accepted, the communication between client and server needs a set of agreements known to both ends. These agreements are defined in a protocol that must be implemented on both ends of a connection. The protocol can be symmetric or asymmetric, depending on the conditions. In a symmetric protocol, both ends can take on the role of either server or client. With an asymmetric protocol, one end is fixed as the server and the other end as the client.
Regardless of whether a symmetric or asymmetric protocol is used for a service, whenever a service is accessed, there is always a client and a server.
The following are described in the sections below:
Connection-oriented server
Connection-oriented client
Connectionless server
Connectionless client