Client-Server Processing and - PowerPoint PPT Presentation

About This Presentation
Title:

Client-Server Processing and

Description:

Chapter 17 Client-Server Processing and Distributed Databases – PowerPoint PPT presentation

Number of Views:194
Avg rating:3.0/5.0
Slides: 60
Provided by: Michael4043
Category:

less

Transcript and Presenter's Notes

Title: Client-Server Processing and


1
Chapter 17
  • Client-Server Processing and
  • Distributed Databases

2
Outline
  • 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

3
Evolution of Distributed Processing and
Distributed Data
  • Need to share resources across a network
  • Timesharing (1970s)
  • Remote procedure calls (1980s)
  • Client-server computing (1990s)

4
Timesharing Network
5
Resource Sharing with a Network of Personal
Computers
6
Client-Server Processing with Distributed
processing only
7
Distributed processing and data
8
Motivation 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

9
Motivation 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

10
Summary of Distributed Processing and Data
11
Client-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.

12
Design 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

13
Tasks 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

14
Middleware
  • 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.

15
Client-Server Computing with Middleware
16
Types 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

17
Two-Tier Architecture
18
Two-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.

19
Three-Tier Architecture (Middleware Server)
20
Three-Tier Architecture (Application Server)
21
Three-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.

22
Multiple-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.

23
Multiple-Tier Architecture
24
Multiple-Tier Architecture with Software Bus
25
Web 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.

26
Internet 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.

27
Internet and Intranet Relationship
28
World 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.

29
Web Page Request Cycle
30
XML/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

31
The 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.

32
Straight CGI
33
Hybrid CGI
34
Server-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.

35
Server-Side Connectivity Approach
36
Server-Side Connectivity with a Middleware Server
37
Client-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

38
Web Page Request Cycle with Client-Side
Connectivity
39
Summary of Web Connectivity
40
Architectures 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.

41
Global Requests
42
Component Architecture
43
Schema Architecture I
44
Schema Architecture II
45
Transparency 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.

46
Motivating Example
47
Fragments Based on the CustRegion Field
48
Fragments Based on the WareHouseNo Field
49
Fragmentation 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.

50
Location 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.

51
Local 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.

52
Distributed 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.

53
Distributed 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.

54
Distributed 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.

55
Distributed 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.

56
Centralized Coordination
57
Distributed 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).

58
Voting and Decision Phases
59
Summary
  • 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.
Write a Comment
User Comments (0)
About PowerShow.com