Title: Client-Server Processing and
1Chapter 17
- Client-Server Processing and
- Distributed Databases
2Outline
- Overview of Distributed Processing and
Distributed Data - Client-Server Database Architectures
- Web Database Connectivity
- Architectures for Distributed Database Management
Systems - Transparency for Distributed Database Processing
- Distributed Database Processing
3Evolution of Distributed Processing and
Distributed Data
- Need to share resources across a network
- Timesharing (1970s)
- Remote procedure calls (1980s)
- Client-server computing (1990s)
4Timesharing Network
5Resource Sharing with a Network of Personal
Computers
6Client-Server Processing with Distributed
processing only
7Distributed processing and data
8Motivation for Distributed Processing
- Flexibility the ease of maintaining and adapting
a system - Scalability the ability to support scalable
growth of hardware and software capacity - Interoperability open standards that allow two
or more systems to exchange and use software and
data
9Motivation for Distributed Data
- Data control locate data to match an
organizations structure - Communication costs locate data close to data
usage to lower communication cost and improve
performance - Reliability increase data availability by
replicating data at more than one site
10Summary of Distributed Processing and Data
11Client-Server Database Architectures
- Client-Server Architecture is an arrangement of
components (clients and servers) among computers
connected by a network. - A client-server architecture supports efficient
processing of messages (requests for service)
between clients and servers.
12Design Issues
- Division of processing the allocation of tasks
to clients and servers. - Process management interoperability among
clients and servers and efficiently processing
messages between clients and servers. - Middleware software for process management
13Tasks to Distribute
- Presentation code to maintain the graphical user
interface - Validation code to ensure the consistency of the
database and user inputs - Business logic code to perform business
functions - Workflow code to ensure completion of business
processes - Data access code to extract data to answer
queries and modify a database
14Middleware
- A software component that performs process
management. - Allow clients and servers to exist on different
platforms. - Allows servers to efficiently process messages
from a large number of clients. - Often located on a dedicated computer.
15Client-Server Computing with Middleware
16Types of Middleware
- Transaction-processing monitors relieve the
operating system of managing database processes - Message-oriented middleware maintain a queue of
messages - Object-request brokers provide a high level of
interoperability and message intelligence - Data access middleware provide a uniform
interface to relational and non relational data
using SQL
17Two-Tier Architecture
18Two-Tier Client-Server Architecture
- A PC client and a database server interact
directly to request and transfer data. - The PC client contains the user interface code.
- The server contains the data access logic.
- The PC client and the server share the validation
and business logic.
19Three-Tier Architecture (Middleware Server)
20Three-Tier Architecture (Application Server)
21Three-Tier Architecture
- To improve performance, the three-tier
architecture adds another server layer either by
a middleware server or an application server. - The additional server software can reside on a
separate computer. - Alternatively, the additional server software can
be distributed between the database server and PC
clients.
22Multiple-Tier Architecture
- A client-server architecture with more than three
layers a PC client, a backend database server,
an intervening middleware server, and application
servers. - Provides more flexibility on division of
processing - The application servers perform business logic
and manage specialized kinds of data such as
images.
23Multiple-Tier Architecture
24Multiple-Tier Architecture with Software Bus
25Web Database Connectivity
- Internet commerce depends heavily on database
access for websites. - Web database connectivity allows a database to be
manipulated through a Web page. - A user may use a Web form to change a database or
view a report generated from a database.
26Internet Basics
- Network of networks
- Uses standard protocols TCP/IP
- TCP splits messages into packets
- IP routes messages
- Each computer on the Internet has a unique
numeric address known as an IP address.
27Internet and Intranet Relationship
28World Wide Web
- Most popular application on the Internet
- Supports browsing pages located on any computer
on the Internet - Hypertext Transport Protocol (HTTP) establishes a
session between a browser and a Web server. - Each page has a unique address known as a URL.
29Web Page Request Cycle
30XML/XSL
- Solutions to HTML limitations
- eXtensible Markup Language (XML)
- Separates content and structure of a document
- Use document type declaration or schema to
specify document structure - eXtensible Style Language (XSL) supports
transformation into display languages - Both are extensible languages
31The Common Gateway Interface (CGI)
- CGI is an interface that allows a Web server to
invoke an external program on the same computer. - The external program uses the parameters passed
by the Web server to produce output that is sent
back to the browser. - Usually, the output contains HTML/XML so that the
browser can display it properly.
32Straight CGI
33Hybrid CGI
34Server-side connectivity
- Server-side connectivity bypasses the external
program needed with the CGI approaches. - Specialized Web server or middleware server is
needed - SQL statements and database logic are kept in a
web page or external file. - The database code can execute stored procedures
on the database server.
35Server-Side Connectivity Approach
36Server-Side Connectivity with a Middleware Server
37Client-Side Connectivity
- Client computing capacity can be more fully
utilized without storing code on the client. - Provides a more customized interface than
permitted by HTML - Supports data buffering by the client to improve
performance
38Web Page Request Cycle with Client-Side
Connectivity
39Summary of Web Connectivity
40Architectures for Distributed Database Management
Systems
- DBMSs need fundamental extensions.
- Underlying the extensions are a different
component architecture and a different schema
architecture. - Component Architecture manages distributed
database requests. - Schema Architecture provides additional layers of
data description.
41Global Requests
42Component Architecture
43Schema Architecture I
44Schema Architecture II
45Transparency for Distributed Database Processing
- Transparency is related to data independence.
- With transparency, users can write queries with
no knowledge of the distribution, and
distribution changes will not cause changes to
existing queries and transactions. - Without transparency, users must reference some
distribution details in queries and distribution
changes can lead to changes in existing queries.
46Motivating Example
47Fragments Based on the CustRegion Field
48Fragments Based on the WareHouseNo Field
49Fragmentation Transparency
- Fragmentation transparency provides the highest
level of data independence. - Users formulate queries and transactions without
knowledge of fragments (locations, or local
formats). - If fragments change, queries and transactions are
not affected.
50Location Transparency
- Location transparency provides a lesser level of
data independence than fragmentation
transparency. - Users need to reference fragments in formulating
queries and transactions. - However, knowledge of locations and local formats
is not necessary.
51Local Mapping Transparency
- Local mapping transparency provides a lesser
level of data independence than location
transparency. - Users need to reference fragments at sites in
formulating queries and transactions. - However, knowledge of local formats is not
necessary.
52Distributed Database Processing
- Distributed data adds considerable complexity to
query processing and transaction processing. - Distributed database processing involves movement
of data, remote processing, and site
coordination. - Performance implications sometimes cannot be
hidden.
53Distributed query processing
- Involves both local (intra site) and global
(inter site) optimization. - Multiple optimization objectives
- The weighting of communication costs versus local
processing costs depends on network
characteristics. - There are many more possible access plans for a
distributed query.
54Distributed Transaction Processing
- Distributed DBMS provides concurrency and
recovery transparency. - Independently operating sites must be
coordinated. - New kinds of failures exist because of the
communication network. - New protocols are necessary.
55Distributed Concurrency Control
- The simplest scheme involves centralized
coordination. - Centralized coordination involves the fewest
messages and the simplest deadlock detection. - The number of messages can be twice as much in
distributed coordination. - Primary Copy Protocol is used to reduce overhead
with locking multiple copies.
56Centralized Coordination
57Distributed Recovery Management
- Distributed DBMSs must contend with failures of
communication links and sites. - Detecting failures involves coordination among
sites. - The recovery manager must ensure that different
parts of a partitioned network act in unison. - The protocol for distributed recovery is the two
phase commit protocol (2PC).
58Voting and Decision Phases
59Summary
- Utilizing distributed processing and data can
significantly improve DBMS services but at the
cost of new design challenges. - Several client-server architectures provide
alternatives among cost, complexity, and benefit
levels. - Architectures for distributed DBMSs differ in the
integration of the local databases and level of
data independence.