ClientServer DBCh12

quicksandwalleyeInternet and Web Development

Oct 31, 2013 (4 years and 2 months ago)

159 views

12

Chapter 12

Client/Server Systems


Hachim Haddouti

12

2


Hachim Haddouti and Rob & Coronel, Ch12

In this chapter, you will learn:


What client/server computing is


What the advantages of using client/server
systems are


client/server architecture, system components
and how they interact


What effect the client/server system has on the
DBMS



12

3


Hachim Haddouti and Rob & Coronel, Ch12

Client/Server Computing


Computing model for the development of
computerized systems


Client requests specific service


Server provides requested service


Reside on same or different computers

Figure 12.1


12

4


Hachim Haddouti and Rob & Coronel, Ch12

Client/Server Computing (con’t.)


Key to client server power is where request
processing takes place


Extent of sharing processing


Thin client


Thin server


Fat client


Fat server


Classification


2
-
tier


3
-
tier

12

5


Hachim Haddouti and Rob & Coronel, Ch12

Forces that Drive Client/Server Trend


Changing business environment


Growing need for enterprise data access


Demand for end
-
user productivity gains based on
efficient use of data


Technological advances


Growing cost/performance advantages


12

6


Hachim Haddouti and Rob & Coronel, Ch12

Evolution of Computing Environment

12

7


Hachim Haddouti and Rob & Coronel, Ch12

Mainframe vs. Client/Server Systems

12

8


Hachim Haddouti and Rob & Coronel, Ch12

Components of Data
-
Intensive
Systems

Three separate types of functionality:


Data management


Application logic


Presentation



The system architecture determines whether
these three components reside on a single
system (“tier) or are distributed across several
tiers

12

9


Hachim Haddouti and Rob & Coronel, Ch12

Single
-
Tier Architectures

All functionality combined into a
single tier, usually on a
mainframe


User access through
dumb terminals


Advantages:


Easy maintenance and
administration

Disadvantages:


Today, users expect
graphical user interfaces.


Centralized computation
of all of them is too much
for a central system

12

10


Hachim Haddouti and Rob & Coronel, Ch12

Client
-
Server Architectures

Work division: Thin client


Client implements only the
graphical user interface


Server implements
business logic and data
management



Work division: Thick client


Client implements both the
graphical user interface and
the business logic


Server implements data
management

12

11


Hachim Haddouti and Rob & Coronel, Ch12

Two
-
Tier Client/Server Architecture


12

12


Hachim Haddouti and Rob & Coronel, Ch12


Client


Front
-
end application


Server


Back
-
end application


Communications middleware


Communications layer

Components of

Client/Server Architecture

12

13


Hachim Haddouti and Rob & Coronel, Ch12

Client
-
Server Architectures (Contd.)

Disadvantages of thick clients


No central place to update the business logic


Security issues: Server needs to trust clients


Access control and authentication needs to be managed at
the server


Clients need to leave server database in consistent state


One possibility: Encapsulate all database access into
stored procedures


Does not scale to more than several 100s of clients


Large data transfer between server and client


More than one server creates a problem: x clients, y
servers: x*y connections


12

14


Hachim Haddouti and Rob & Coronel, Ch12

The Three Layers

Presentation tier


Primary interface to the user


Needs to adapt to different display devices (PC, PDA,
cell phone, voice access?)

Middle tier


Implements business logic (implements complex
actions, maintains state between different steps of a
workflow)


Accesses different data management systems

Data management tier


One or more standard database management systems


12

15


Hachim Haddouti and Rob & Coronel, Ch12

The Three
-
Tier Architecture

Database System

Application Server

Client Program (Web Browser)

Presentation tier

Middle tier

Data management

tier

12

16


Hachim Haddouti and Rob & Coronel, Ch12

Three
-
Tier Client/Server Architecture


12

17


Hachim Haddouti and Rob & Coronel, Ch12

Advantages of the Three
-
Tier
Architecture


Heterogeneous systems


Tiers can be independently maintained, modified, and replaced


Thin clients


Only presentation layer at clients (web browsers)


Integrated data access


Several database systems can be handled transparently at the
middle tier


Central management of connections


Scalability


Replication at middle tier permits scalability of business logic


Software development


Code for business logic is centralized


Interaction between tiers through well
-
defined APIs: Can reuse
standard components at each tier

12

18


Hachim Haddouti and Rob & Coronel, Ch12

Example 1: Airline reservations


Build a system for making airline reservations


What is done in the different tiers?


Database System


Airline info, available seats, customer info, etc.


Application Server


Logic to make reservations, cancel reservations,
add new airlines, etc.


Client Program


Log in different users, display forms and human
-
readable output

12

19


Hachim Haddouti and Rob & Coronel, Ch12

Example 2: Course Enrollment


Build a system using which students can enroll in
courses


Database System


Student info, course info, instructor info, course
availability, pre
-
requisites, etc.


Application Server


Logic to add a course, drop a course, create a new
course, etc.


Client Program


Log in different users (students, staff, faculty),
display forms and human
-
readable output

12

20


Hachim Haddouti and Rob & Coronel, Ch12

Technologies

Database System

(SQL Server, Oracle, DB2)

Application Server

(Tomcat, Apache, IIS)

Client Program

(Web Browser)

HTML

Javascript

XSLT

ASP, JSP

Servlets

Cookies

CGI

XML

Stored Procedures

12

21


Hachim Haddouti and Rob & Coronel, Ch12


Fast CPU


Fault
-
tolerant capabilities


Dual power


Standby power


Error checking and correcting memory


RAID


Expandability of CPU, memory, disk, and
peripherals


Bus support for multiple add
-
on boards


Multiple communications options

Typical Characteristics of

Server Hardware

12

22


Hachim Haddouti and Rob & Coronel, Ch12


Client operating systems


Microsoft Windows


OS/2, Apple Mac OS, Unix, Linux


Client graphical user interfaces


Microsoft Windows


OS/2 Presentation Manager, Macintosh, UNIX


Server operating systems and network
protocols


Database servers: Unix, OS/2, Windows NT
Server/2000 Server


Printer and file servers: Novell Netware


LAN protocols: TCP/IP, IPX/SPX, NetBIOS


Middleware


ODBC, IDAPI, DRDA, Q+E

Competing Standards

12

23


Hachim Haddouti and Rob & Coronel, Ch12


Transparent data access to multiple,
heterogeneous clients


Allow client requests to the database server over
network


Process client data requests at local server


Send only SQL results to clients over network

Client/Server DBMS Functions

12

24


Hachim Haddouti and Rob & Coronel, Ch12

Summary: Advantages of

Client/Server Systems

+
Lower network traffic

+
Improved processing distribution

+
Thinner clients

+
Greater processing transparency

+
Increased network, hardware, and software transparency

+
Improved security

+
Decreased costs

+
Increased scalability



12

25


Hachim Haddouti and Rob & Coronel, Ch12


Management Issues


Communications infrastructure


Applications


Controlling escalating and hidden costs


People and cultural changes


Multiple vendor relationships


Development tool acquisition


Determination if client/server approach is correct



Client/Server Implementation Issues