Lecture 22
Client-Server Systems
Personal computers have increased in power and availability. This allows a portion of the work done by the centralized system to be transferred to the local computer. One of the most obvious functions that can be transferred is the user-interface.
The system with the DBMS then becomes a server and the local systems become clients. A single server can process the requests from many clients, and since the interface is being handled by the client, the server has less work to do and can process more requests in any given time unit. The clients are the front-end and the server is the back-end of the total DBMS system.
The front-end consists of tools such as forms, report writers, and GUI software. The back-end controls everything else. There is a new functionality added to the system, communications. The communications functions are split between the front-end and the back-end.
Silberschatz lists two types of client/server (CS) systems: Transaction-server and data-server.
Transaction Servers
The personal computers and workstations ship transactions to the server where those transactions are executed and the results are shipped back to clients. Standards such at Open Database Connectivity (ODBC) and remote procedure calls (RPC) have been developed for this. Gutpa SQL and Powerserver are examples of independent front-end systems. Sun Microsystems has developed an interface for Java known as Java Database Connectivity (JDBC).
Because of the changes in Information Technology (all facets), many corporations are now down-sizing from mainframes. They are often using a high-end workstation as the server and using the PCs and workstations that are ubiquitous in the workplace as the front-end clients. The advantages are better functionality, for the cost, more flexibility in locating resources and expanding facilities, and easier maintenance. It is also easier and cheaper to train employees, since the majority of the front-end skills are the standards skills to operate a PC. Another factor in the drive away from centralized systems, is the Year 2000 problem solutions often include replacing old hardware and specialized software with more modern technology.
Data Servers
Data-server systems are used when the tasks are compute-intensive and it is not desirable to have the back-end occupied with that load. Note that the impact on the front-end for communications because the it takes milliseconds for the network access compared to less than 100 nanoseconds for local memory access. This leads to sever architecture issues:
- Page shipping versus item shipping
The overhead is for a single transfer is almost a fixed cost. Therefore if several items can be transferred at the same time, there is a relatively tremendous time savings by pre-fetching data.
- Locking
If the server locks are the data that has been transferred to this client, it can have an adverse impact on other clients. Different locking schemes need to be available.
- Data caching
Data received from the server can be cached even between transactions. This can speed up the processing, but can cause other problems, consistence, integrity, and coherence. It is possible to exchange messages to insure the validity of the cached data and re-acquired necessary locks.
- Lock caching
If the use of the data is mostly partitioned among the clients, with clients rarely requesting data that are also requested by other clients, locks can be cached at the client. The server must monitor these cached locks and mediate any new requests for that data.