Core Question:
How do two computers on opposite sides of the planet divide the work of running an application?
🍏 Tutor’s Notes
When you open Instagram, search on Google, or stream a movie on Netflix, where does all that content actually live? Obviously, all 100 million songs on Spotify aren't downloaded onto your phone's storage.
Instead, almost all modern software splits the workload between two players:
- The Client: The device and app in front of you that asks for things.
- The Server: The powerful computer far away that stores the data, does the heavy lifting, and sends back what you asked for.
This relationship—where one program requests a service and another program provides it—is called Client ↔ Server Architecture.
The Restaurant Analogy
Think of using an app like ordering food at a restaurant:
- You (and the Menu) are the Client: You sit at the table, browse the menu (the user interface), and decide what you want. You don't need to know how the stove works or where the ingredients are kept—you just place an order.
- The Kitchen is the Server: Hidden behind swinging doors, the kitchen holds all the raw ingredients (data), follows secret recipes (business logic), checks if your table is allowed to order off the VIP menu (security), cooks the meal, and sends the finished plate back to your table.
If every customer walked into the kitchen to cook their own food, it would be chaos—ingredients would get stolen, recipes would get ruined, and the kitchen would catch fire. Keeping the Client (dining area) separate from the Server (kitchen) keeps things organized, fast, and secure.
Meet the Players
1. What is a Client?
In computing, "client" is a role. It refers to both the physical device you use and the software running on it that initiates a request:
- Hardware Clients: Your laptop, smartphone, tablet, smart TV, or smartwatch.
- Software Clients: Web browsers (Chrome, Safari, Firefox), mobile apps (WhatsApp, Uber), or desktop apps (Slack, VS Code).
The Client's Job:
- Display the User Interface (UI)—buttons, text, images, and animations.
- Capture user actions (clicks, taps, form submissions).