
Let’s think it through · Start with a story
A girl asks to borrow a book at the library, and a robot at the desk handles the request. Who is asking, and who is providing the service?
Break down the process
- ClientRequests something
- ServerHandles the request
- ResponseSends the result back
A client requests a service, and a server provides it; these are roles in communication.
A phone app or browser can be a client. A server may be in a distant data center or on the same computer. One service can also act as a client when it requests another service.
The roles depend on the particular interaction.
Your turn
When a website server queries a separate database service, can it also be a client in that interaction?
Have an answer? Click to see the explanation
Yes. It requests data from the database while still providing a service to the browser.
Takeaway
A client requests a service, and a server provides it; these are roles in communication.
Try covering the diagram and explaining each step to someone at home. If a step is hard to explain, go back and look at that card again.