CLIENT-SERVER COMMUNICATION

The client-server model is a distributed application structure that partitions tasks or workloads between the providers of a resource or service, called servers, and service requesters, called clients. Often clients and servers communicate over a computer network on separate hardware, but both client and server may reside in the same system.

A server host runs one or more server programs which share their resources with clients. A client does not share any of its resources, but requests a server's content or service function. Clients therefore initiate communication sessions with servers which await incoming requests.

Examples of computer applications that use the client-server model are Email, network printing, and the World Wide Web.


Two processes in client-server model can interact in various ways:

a. Sockets: In this paradigm, the process acting as Server opens a socket using a well-known (or known by client) port and waits until some client request comes. The second process acting as a Client also opens a socket but instead of waiting for an incoming request, the client processes ‘requests first’.

b. RPC: This is a mechanism where one process interacts with another by means of procedure calls. One process (client) calls the procedure lying on remote host. The process on remote host is said to be Server. Both processes are allocated stubs to aid this process.

More information on Sockets can be obtained on selecting Sockets in the Select the Communication Mode dropdown. As for the RPCs, we have an animation to demonstrate the working. Select on the RPC options.