Vous êtes sur la page 1sur 41

Unit I

ADBMS : CONCEPTS AND


ARCHITECTURES
Prepared by Prof Sujit K Singh

Centralized and Client-Server Systems


Server System Architectures
Parallel Database
Distributed Database
Web based system

UC Berkeley: IEOR 215

UC Berkeley: IEOR 215

Centralized Systems
Run on a single computer system and do not interact with other computer systems.
General-purpose computer system: one to a few CPUs and a number of device
controllers that are connected through a common bus that provides access to shared
memory.
Single-user system (e.g., personal computer or workstation): desk-top unit, single
user, usually has only one CPU and one or two hard disks; the OS may support only
one user.
Multi-user system: more disks, more memory, multiple CPUs, and a multi-user OS.
Serve a large number of users who are connected to the system vie terminals. Often
called server systems.

A Centralized Computer System

Client-Server Systems
Server systems satisfy requests generated at m client systems, whose general structure is
shown below:

Client-Server Systems (Cont.)


Database functionality can be divided into:
Back-end: manages access structures, query evaluation and optimization,

concurrency control and recovery.


Front-end: consists of tools such as forms, report-writers, and graphical user
interface facilities.
The interface between the front-end and the back-end is through SQL or through an
application program interface.

Client-Server Systems (Cont.)


Advantages of replacing mainframes with networks of workstations or personal
computers connected to back-end server machines:
better functionality for the cost
flexibility in locating resources and expanding facilities
better user interfaces

easier maintenance

UC Berkeley: IEOR 215

Server System Architecture


Server systems can be broadly categorized into two kinds:
transaction servers which are widely used in relational database systems, and
data servers, used in object-oriented database systems

Transaction Servers
Also called query server systems or SQL server systems
Clients send requests to the server
Transactions are executed at the server
Results are shipped back to the client.

Requests are specified in SQL, and communicated to the server through a remote

procedure call (RPC) mechanism.


Transactional RPC allows many RPC calls to form a transaction.
Open Database Connectivity (ODBC) is a C language application program interface
standard from Microsoft for connecting to a server, sending SQL requests, and
receiving results.
JDBC standard is similar to ODBC, for Java

Transaction Server Process Structure


A typical transaction server consists of multiple processes accessing data in shared
memory.
Server processes
These receive user queries (transactions), execute them and send results back
Processes may be multithreaded, allowing a single process to execute several user

queries concurrently
Typically multiple multithreaded server processes
Lock manager process
More on this later
Database writer process
Output modified buffer blocks to disks continually

Transaction Server Processes (Cont.)


Log writer process
Server processes simply add log records to log record buffer
Log writer process outputs log records to stable storage.

Checkpoint process
Performs periodic checkpoints

Process monitor process


Monitors other processes, and takes recovery actions if any of the other processes

fail
E.g. aborting any transactions being executed by a server process and restarting
it

Transaction System Processes (Cont.)

Transaction System Processes (Cont.)


Shared memory contains shared data
Buffer pool
Lock table
Log buffer
Cached query plans (reused if same query submitted again)
All database processes can access shared memory
To ensure that no two processes are accessing the same data structure at the same
time, databases systems implement mutual exclusion using either
Operating system semaphores
Atomic instructions such as test-and-set

To avoid overhead of interprocess communication for lock request/grant,

each database process operates directly on the lock table


instead of sending requests to lock manager process
Lock manager process still used for deadlock detection

Data Servers
Used in high-speed LANs, in cases where
The clients are comparable in processing power to the server
The tasks to be executed are compute intensive.

Data are shipped to clients where processing is performed, and then shipped results
back to the server.

This architecture requires full back-end functionality at the clients.


Used in many object-oriented database systems
Issues:
Page-Shipping versus Item-Shipping
Locking
Data Caching
Lock Caching

Data Servers (Cont.)


Page-shipping versus item-shipping
Smaller unit of shipping more messages
Worth prefetching related items along with requested item
Page shipping can be thought of as a form of prefetching
Locking
Overhead of requesting and getting locks from server is high due to message
delays
Can grant locks on requested and prefetched items; with page shipping,
transaction is granted lock on whole page.
Locks on a prefetched item can be P{called back} by the server, and returned by
client transaction if the prefetched item has not been used.
Locks on the page can be deescalated to locks on items in the page when there

are lock conflicts. Locks on unused items can then be returned to server.

Data Servers (Cont.)


Data Caching
Data can be cached at client even in between transactions
But check that data is up-to-date before it is used (cache coherency)
Check can be done when requesting lock on data item

Lock Caching
Locks can be retained by client system even in between transactions
Transactions can acquire cached locks locally, without contacting server
Server calls back locks from clients when it receives conflicting lock request.

Client returns lock once no local transaction is using it.


Similar to de-escalation , but across transactions.

Cloud Computing?
The cloud is Internet-based computing,

whereby shared resources, software, and


information are provided to computers
and other devices on demand pay per
use.
Cost-effective means of virtualising and making use of
resources more effectively
Low start-up costs pay for use helps to kick-start companies
Scaling is proportional to demand (revenue) so its a good business
model

Vast range of Cloud Computing applications


Virtual private servers, Web hosting, data servers, Transaction server,
etc

Basic Cloud Characteristics


The no-need-to-know in terms of the underlying details
of infrastructure, applications interface with the
infrastructure via the APIs.
The flexibility and elasticity allows these systems to
scale up and down at will
utilising the resources of all kinds
CPU, storage, server capacity, load balancing, and databases

The pay as much as used and needed type of utility

computing and the always on, anywhere and any place


type of network-based computing.
19

Basic Cloud Characteristics


Cloud are transparent to users and applications, they can be

built in multiple ways


branded products, proprietary open source, hardware or

software.

In general, they are built on clusters of PC servers plus Open

Source software combined with in-house applications and/or


system software.

20

Motivation Example: Forbes.com


You offer on-line real time

stock market data

Rate of
Server
Accesses

Why pay for capacity

weekends, overnight?

9 AM - 5 PM,
M-F

ALL OTHER
TIMES

Forbes' Solution
Host the web site in Amazon's EC2 Elastic Compute

Cloud
Provision new servers every day, and deprovision
them every night
Pay just $0.10* per server per hour
* more for higher capacity servers

Let Amazon worry about the hardware!

Cloud computing takes


virtualization to the next step
You dont have to own the hardware
You rent it as needed from a cloud

There are public clouds


e.g. Amazon EC2, and now many others (Microsoft, IBM,
Sun, and others ...)
A company can create a private one
With more control over security, etc.

Cloud Computing Overview

A Basic Introduction

UC Berkeley: IEOR 215

Web Based system :

Web servers are the machines or programs from which requests are
made and fulfilled over the Internet. They provide one of the
endpoints in communication when users request an online service

Tier
mean a physical tier defined by a physical server.

Layer
mean a section of the system that is contained within its own process or
deployment unit. Multiple layers may co exist on one tier.

Business Logic
A workflow or procedure that defines the way a company conducts business .

Client Server Architecture


A network architecture
in which each computer
or process on the
network is either a

client or a server.

Source: http://webopedia.lycos.com
May 2002

UNT Center for Digital Knowledge

27

Components
Clients
Servers
Communication Networks

Server

Client

May 2002

UNT Center for Digital Knowledge

28

Clients
Applications that run on computers
Rely on servers for
Files

Clients are Applications

Devices
Processing power

Example: E-mail client


An application that enables you to send and receive e-mail

May 2002

UNT Center for Digital Knowledge

29

Servers
Computers or processes that manage network resources
Disk drives (file servers)

Servers Manage Resources

Printers (print servers)


Network traffic (network servers)

Example: Database Server


A computer system that processes database queries

May 2002

UNT Center for Digital Knowledge

30

ClientServer Computing
Process takes place
on the server and
on the client
Client-Server Computing Optimizes
Computing Resources

Servers
Store and protect data
Process requests from clients

Clients
Make requests
Format data on the desktop

May 2002

UNT Center for Digital Knowledge

31

Problem Of Client/Server
The biggest and the most pressing problem at that time was one

of connection count
Servers were often licensed per client connection
In the 1990's most databases began to become heavily and the
speed of database reduced

3-Tier Architecture
Come To Solve Client/Server Problems

A middle layer can solve these problems (Transaction


processing monitors, Message servers, Application servers,
Object Request Brokers (ORB))

N-Tier Architecture
N-Tier: An unlimited number of tiers.
Each tier may have multiple computers.
Advantages:
More powerful applications
Many services to many clients
Enhanced security, scalability and availability

Disadvantages:
Much more complicated to design and model
Performance risks
Reliability is more difficult to achieve
More difficult to maintain software

Types Of N-Tier Architecture

Business Logic
Business logic is a non-technical term generally used to

describe the functional algorithms that handle


information exchange between a database and a user
interface.
models real life business objects (such as accounts, loans,
itineraries, and inventories)
enforces the methods by which business objects are accessed
and updated.
business rules that express business policy (such as Taxes,
logistics, prices, and products)

Location of business logic


In a multilayered architecture (2-tire architecture)

business logic is a separate module.

In the common 3-tier architecture, the business logic is

the middle tier.

Business Logic SOAP (

Simple Object Access Protocol

SOAP is an XML-based messaging protocol. It defines a set of

rules for structuring messages that can be used for simple oneway messaging but is particularly useful for performing RPCstyle (Remote Procedure Call) request-response dialogues.
It is not tied to any particular transport protocol though HTTP is
popular. Nor is it tied to any particular operating system or
programming language so theoretically the clients and servers in
these dialogues can be running on any platform and written in
any language as long as they can formulate and understand
SOAP messages

SOAP (Simple Object Access Protocol) is a way for a

program running in one kind of operating system (such as


Windows 2000) to communicate with a program in the
same or another kind of an operating system (such as
Linux) by using the World Wide Web's Hypertext
Transfer Protocol (HTTP)and its Extensible Markup
Language (XML) as the mechanisms for information
exchange .
SOAP was developed by Microsoft, DevelopMentor, and
Userland Software and has been proposed as a standard
interface to the Internet Engineering Task Force (IETF).

Vous aimerez peut-être aussi