BolEnglishLearn · Play · Win
Login

🖥️ System Design · System Building Blocks

🖥️

Client-Server

Building BlockCoreModule 3

Clients request services or data from a server.

Your browser is usually a client; backend software processes requests.

💡 In practice

A browser sends /orders/123 to a server and receives order data.

🖼️ CONCEPT PICTURE
A picture to help remember Client-Server
A browser sends /orders/123 to a server and receives order data.

💡 Like ordering at a counter: you ask for what you want, the kitchen does the work and hands it back.

💡 Learn🛠️ Apply🎯 Check

💡 Why it matters

Almost every app you use follows this pattern, so understanding it is the foundation for everything else. Splitting work between a client and a server lets many users share one powerful backend and keeps data in one trusted place. Knowing where work happens helps you decide what to do on the device and what to keep on the server.

🛠️ How to achieve it

1
Decide who does what
Keep trusted rules and data on the server; let the client handle display and quick interactions.
2
Design clear requests
Give each request a clear address and meaning, so the server knows exactly what is being asked.
3
Never trust the client
Validate and authorize on the server, because anything on the device can be tampered with.
4
Keep responses focused
Send back just the data the client asked for, in a predictable shape.

⚠️ Signs of trouble

  • •Important rules run only on the client and can be bypassed.
  • •The server returns far more data than the client needs.
  • •Request meanings are unclear or inconsistent.
  • •The client assumes the server is always fast and always up.
⚠️ Common mistake: Trusting the client to enforce rules like price or permissions. Always validate and authorize on the server, because anything on the device can be changed.

🎯 Quick check

Score: 0/3

Three questions to test the idea.

  1. 1. In the client-server model, what does the server do?

    Answer: Processes requests and returns results

    The server does the trusted processing and sends results back to the client that asked.

  2. 2. Why should you never trust the client to enforce rules?

    Answer: Anything on the device can be tampered with

    Code and data on the device can be changed, so rules and permissions must be checked on the server.

  3. 3. What makes a good request design?

    Answer: A clear address and meaning for what is asked

    Clear, predictable requests let the server understand exactly what the client needs.

🔑 Key terms

Client
The program that asks for data or actions, like a browser.
Server
The backend program that processes requests and returns results.
Request
A message asking the server to do or return something.
Response
The server's answer to a request.

✅ Review checklist

📊 Your progress

0%
Mark this topic learned to track it.
Saved in this browser.
🚀 Got it?
Mark it learned and move to the next topic.
Next topic →