Clients, Servers and Network Applications
Who asks and who answers?
In a typical client-server exchange, a client program initiates a request for a service, and a server program provides the service. These are roles in an interaction, not permanent categories of hardware. A laptop can run both kinds of program. A server might supply a file, answer a question or reject an unauthorized request.
Example: ask for a file
In our fictional two-host network, the computer Reader runs a file client, and Archive runs a file service. Reader requests notes.txt. Archive checks that the file is available and the request is allowed, then returns the contents. The reply travels in the opposite direction. The client uses the returned data.
Reader -- request notes.txt --> ArchiveReader <-- file: Study plan --- ArchiveThis is an invented message trace, not a real file-transfer protocol. If the file is absent, the server may instead reply with an error.
How applications use the network
A browser requests resources from a web service using HTTP or its secure use over TLS (HTTPS). File sharing can use other protocols. A messaging application may send a message to a service that delivers it to a recipient later; a media player may receive a sequence of data for playback. Cloud services let applications use remote computing resources. These examples share the need for communication, not necessarily the same protocol or the same request-response pattern.
One device, more than one role
Suppose Archive needs information from a separate Catalog service before returning a file. Archive acts as server toward Reader and client toward Catalog. In peer-to-peer designs, participants can provide and consume resources rather than relying exclusively on one central server. The role depends on the exchange you are analyzing.
A reply is not always a successful result
A network path can work even when a server reports that a file is missing. The error is useful evidence that at least that request and reply reached their respective endpoints. It does not establish that every other service or path is healthy. Do not confuse application success with basic communication.
Practice: label the roles
A phone asks a music service for a playlist; the service asks a storage service for song metadata. Identify the client and server in each exchange. Check: phone is client of music service; music service is client of storage service and server to the phone. Next: compare networks of different sizes and purposes.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Clients, servers and applications — knowledge check
Apply the concepts to fictional network situations.
Reader asks Archive for notes.txt. Who acts as client?
Archive requests information from Catalog before replying to Reader. What is Archive’s role toward Catalog?
Which is true of network applications?
A file service returns “file missing.” What is supported by this observation?
Can one laptop run both client and server programs?