Unit content
Client-server systems
Many networked applications organize communication around clients that request a service and servers that provide it.
Server endpoints
A server process waits for requests at a known application endpoint, commonly associated with a host address and transport port.
A client chooses that endpoint, establishes or uses the appropriate transport communication and sends application data according to the service protocol.
Roles, not permanent machine types
“Client” and “server” describe roles in one interaction. The same physical computer can run server software for one service while acting as a client of another.
Many clients
A server commonly handles requests from many clients. Those requests may overlap in time, so server software must manage concurrent or interleaved work without confusing one client's state with another's.
Stateless and stateful services
A stateless interaction contains enough information for each request to be processed without remembering earlier application requests.
A stateful service retains information across interactions, such as an authenticated session or an ongoing game.
Protocol contract
Client and server only need to agree on the protocol they exchange. Their internal implementations, programming languages and operating systems can differ completely.
Client-server architecture therefore separates service consumers from service providers through a network protocol boundary.