Client-Server Architecture
What are client and server? ๐ป
- A client is a computer/device, that uses a service or accepts the information.
- Eg: Laptop, phone, workstations, etc.
- A Server is a remote computer that provides access to data and services.
- Eg: Virtual servers (cloud computing), rack servers, etc.
Client-Server architecture ๐
- It follows request-response pattern.
Client/server information is exchanged via the TCP protocol until the connection is complete.
How it works?
1) Client sends a request to the server, and a TCP connection is opened.
2) Server accepts it, makes necessary decisions, and interacts with the Database or external resources if needed.
3) Response is sent back to the client, and the TCP connection is closed.
Types ๐พ :
1-tier architecture:
- All the logic related to the User Interface, Business Logic, Database Logic, and Database are grouped to make a single entity.
2-tier architecture:
The whole application logic is divided into 2 layers. The database acts as a separate entity and the client, and business logic act as another separate entity.
Eg: An online reservation system.
3-tier architecture:
Has a middleware between the client and the server
These are the layers that hold 3-tier architecture:
- Presentation layer (Users Tier)
- Application layer (Business Tier)
- Database Tier (Data Tier)
Advantages โ :
Management is Easy
Easily Accessible
Servers are Scalable
Centralized Control
Security
Disadvantages โ:
Less Robust
Requires Regular Maintenance
Network Congestion (when many clients access a single server)
=================
References:
- teachcomputerscience.com/client-server-arch..
- interviewbit.com/blog/client-server-archite..
- serverwatch.com/guides/client-server-model
- simplilearn.com/what-is-client-server-archi..