590 likes | 771 Views
Chapter 17. Client-Server Processing and Distributed Databases. Outline. Overview of Distributed Processing and Distributed Data Client-Server Database Architectures Web Database Connectivity Architectures for Distributed Database Management Systems
E N D
Chapter 17 Client-Server Processing and Distributed Databases
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
Evolution of Distributed Processing and Distributed Data • Need to share resources across a network • Timesharing (1970s) • Remote procedure calls (1980s) • Client-server computing (1990s)
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
Motivation for Distributed Data • Data control: locate data to match an organization’s 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
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.
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
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
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.
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
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.
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.
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.
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.
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.
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.
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
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.
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.
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
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.
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.
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.
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.