API Fundamentals Course
API Fundamentals
/
Beginner

Client-Server Architecture

Definition

A computing model that acts as a distributed application structure, partitioning tasks between the providers of a resource/service (the Server) and service requesters (the Client).

Explain Like I'm New

The Client is the customer (your iPhone, a web browser, a smart fridge). The Server is the store manager sitting in an Amazon data center. The Client asks for things, and the Server decides if the Client is allowed to have them.

Real World Example

Playing a multiplayer video game. Your Xbox (the Client) tells the Server 'I shot my gun'. The Server does the math to see if you hit someone, and then tells all the other Xbox Clients 'Player 1 got a hit'.

Common Use Cases

  • •Fundamental web knowledge
  • •System decoupling

Architecture & Flow

Interactive Example

Loading...
Console output will appear here...

Interview Questions

basic

  • In a typical web application, which machine is considered the 'Client'?

intermediate

  • Why don't we just put the database directly on the Client's machine and skip the server?

Flash Cards

Question

Which is the Client?

Click to reveal answer
Answer

The user's device (their web browser, their mobile app, their smart TV).

Question

Why not database on client?

Click to reveal answer
Answer

Security and Synchronization. If the database is on the user's phone, they could hack it to give themselves a billion dollars. A centralized Server acts as the 'Source of Truth' that cannot be tampered with by clients.