Client/Server Computing: C/S Computing, Middleware
1. Client/Server (C/S) computing
Client/Server computing is a distributed model in which work is split between two kinds of programs:
- Client – requests a service (browser, mobile app). Usually has the user interface.
- Server – provides the service (web server, database server, mail server). Waits for requests, serves many clients.
They communicate over a network using a protocol (HTTP, SQL over TCP, RPC).
Characteristics
- Clear separation of service requester and service provider.
- One server serves many clients; client initiates, server responds.
- Location transparency – client need not know where the server is.
- Clients and servers may run on different hardware/OS (platform independence).
- Scalable: add more clients or servers.
- Resources (data, printers) are centralised and shared.
Examples
Browser ↔ web server; e-mail client ↔ mail server; ATM ↔ bank database; mobile app ↔ cloud API.
Advantages and disadvantages
| Advantages | Disadvantages |
|---|---|
| Centralised data, easy backup and security | Server is a single point of failure |
| Easy to upgrade server logic once | Network congestion/overload |
| Resource sharing, cost saving | Server cost and maintenance |
| Scalable and flexible | Needs skilled administration |
Client/Server vs Peer-to-Peer
| C/S | P2P |
|---|---|
| Dedicated server | Every node both client and server |
| Centralised control | Decentralised |
| Easier to secure | Harder to manage |
| Web, email | BitTorrent, blockchain |
2. Types of servers
File server, print server, application server, database server, web server, mail server, proxy server, DNS server.
3. Tiers (preview)
- 2-tier: client ↔ database server (client holds UI + business logic).
- 3-tier: client ↔ application server ↔ database. (Detailed in the next topic.)
4. Middleware
Middleware is software that sits between the client and the server (or between applications) and hides the differences in hardware, OS, network and language. It provides a common way for distributed components to communicate. It is often called "software glue".
Functions of middleware
- Message passing and protocol translation.
- Locating servers (naming / directory service).
- Authentication and security.
- Transaction management and load balancing.
- Hiding platform heterogeneity (different OS, languages, databases).
Types
| Type | Example |
|---|---|
| Remote Procedure Call (RPC) | Sun RPC, gRPC |
| Message-Oriented Middleware (MOM) | RabbitMQ, Kafka, IBM MQ |
| Object middleware | CORBA, Java RMI, DCOM |
| Database middleware | ODBC, JDBC |
| Transaction Processing monitors | Tuxedo, CICS |
| Application servers / web services | Tomcat, JBoss, REST/SOAP gateways |
Example: JDBC/ODBC
An application calls a standard API; the driver (middleware) converts calls into the specific database protocol – so the same code works with MySQL or Oracle.
Why middleware matters
Without it every client would need custom code for every server. With it, development is faster, systems interoperate and the architecture scales.
Frequently Asked Questions
QWhat is client/server computing?
A distributed architecture where clients request services and servers provide them, communicating over a network.
QGive examples of clients and servers on the web.
Client: browser. Servers: Apache web server, MySQL database server, SMTP mail server.
QWhat are the advantages of the client/server model?
Centralised data and control, resource sharing, scalability, easier maintenance and security, platform independence.
QDifference between client/server and peer-to-peer?
C/S has dedicated servers and central control; in P2P every node is both client and server and there is no central authority.
QWhat is middleware?
Software between client and server that hides heterogeneity and provides communication, security, naming and transaction services.
QName some types of middleware.
RPC, message-oriented middleware, object brokers (CORBA, RMI), database middleware (ODBC/JDBC), TP monitors, application servers.
QWhy is middleware needed in a C/S system?
To let clients and servers on different platforms and languages interoperate without custom code for each pair, and to provide shared services like security and load balancing.
QWhat is the main disadvantage of client/server?
Server is a bottleneck and single point of failure; heavy traffic can overload the network.