๐ฅ๏ธ
Client-Server
Traditional Request-Response Model
The most traditional and widely used architecture. It follows a unidirectional flow where the client sends a request and the server responds, with HTTP/HTTPS being the most representative protocol.
Architecture Diagram
๐
Browser
๐ฑ
Mobile App
Request
→
←
Response
๐ฅ๏ธ
Server
API / Web Server
↔
๐๏ธ
Database
Flow Description
- Client sends HTTP request to server
- Server receives request and executes business logic
- Query/store in database as needed
- Server returns response to client
How It Works
1
Client sends HTTP request to server (GET, POST, etc.)
2
Server receives and processes the request
3
Server queries database / executes business logic
4
Server returns HTTP response to client
Pros
- ✓ Simple to implement
- ✓ Easy to debug
- ✓ Caching can be utilized
- ✓ Standardized protocols
Cons
- ✗ Server can become a bottleneck
- ✗ Difficult to do real-time updates
- ✗ Service disruption when server goes down
- ✗ Client must always initiate the request
Use Cases
Web applications (Browser โ Web server)
REST API
GraphQL API
Mobile app backend