Client-Server Architecture and Database Management Systems - Prof. John Musacchio, Study notes of Accounting

The concept of client-server architecture and database management systems, including the responsibilities of a dbms, the benefits of separating application logic and web server, and the use of ncs and java in server implementations. It also provides an example of an architecture for a hypothetical handheld computer (hhc) for flight attendants. The document also touches on the topic of data types and their representation in computing.

Typology: Study notes

Pre 2010

Uploaded on 09/17/2009

koofers-user-kle
koofers-user-kle 🇺🇸

5

(1)

10 documents

1 / 13

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
ISM 50 - Business Information Systems
Lecture 12
Instructor: John Musacchio
UC Santa Cruz
October 31, 2006
Announcements
Read Messerschmitt Ch 7 for Tuesday.
Presenters for Thursday
Zhuo H Yang (news)
Christy Kitmum Loke (news)
Database Tutorial Sessions
Student Talks
Devin Blann ( news)
George Numair (news)
Client-Server Architecture
(continued)
Client Server Example – Layers Revealed
Client
Application:
Infrastructure
Server
<html><head><meta http-equiv="content-type"
content="text/html; charset=UTF-
8"><title>Google</title><style><!--
body,td,a,p,.h{font-family:arial,sans-serif;}
.h{font-size: 20px;}
.q{color:#0000cc;}
//--> …
Packet Packet
Infrastructure
Application
Internet
PacketPacket
<html><head><meta http-equiv="content-type"
content="text/html; charset=UTF-
8"><title>Google</title><style><!--
body,td,a,p,.h{font-family:arial,sans-serif;}
.h{font-size: 20px;}
.q{color:#0000cc;}
//--> …
3-Tier Client Server Architecture example
Application Server
Clicks, keystrokes
<head>
<title>Bank of America | Online Banking | Accounts Overview</title>
<meta name="Description" content="Bank of America Online Banking
-Accounts Overview">
<link rel="stylesheet" type="text/css" href="/eas-
docs/images/win_ie.css">
<script language="JavaScript" type="text/javascript" src="/eas-
docs/ias_js/scripts.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
function hover(ref, classRef) { eval(ref).className= classRef; }//-->
</script>
Shared
data
What is Bob’s balance?
$0.50
Client
Balance $0.50
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download Client-Server Architecture and Database Management Systems - Prof. John Musacchio and more Study notes Accounting in PDF only on Docsity!

ISM 50 - Business Information Systems

Lecture 12

Instructor: John Musacchio

UC Santa Cruz

October 31, 2006

Announcements

„ Read Messerschmitt Ch 7 for Tuesday.

„ Presenters for Thursday

‰ Zhuo H Yang (news)

‰ Christy Kitmum Loke (news)

Database Tutorial Sessions

Student Talks

„ Devin Blann ( news)

„ George Numair (news)

Client-Server Architecture

(continued)

Client Server Example – Layers Revealed

Client

Application:

Infrastructure

Server

Google

3-Tier Client Server Architecture example

Application Server

Shared
data

Web Server

Application Logic

Common Gateway Interchange

Client

3-Tier Client Server Architecture example

Application Server

Shared
data

Web Server

Application Logic

Common Gateway Interchange

Client

Database Management System (DBMS)

What is Bob’s Balance?

Database

3-Tier Client Server Architecture example

Application Server

Shared
data

Web Server

Java Servlet

Client

Database Management System (DBMS)

What is Bob’s Balance?

Database

In some implementations Application Logic and Web Server can be put on Different machines.

Application Logic

Relational Database

Customer

Class

Customer Balance

Charles $1000000 Gold

Bob $0.50 Bronze

Alice $527 Silver

DBMS Responsibilities

„ Hide Changes in the Database hardware from the

Application

„ Standard operations on the data, including

searches, such a search is called aquery.

„ Separate Database Management from

Applications, so that many applications can access

the same data.

„ Security, Integrity, Backup, fault tolerance, etc..

3-Tier Client Server Architecture in General

Application Server

Shared
data

Client

-Accept instructions from user -Make requests of server -Display responses of server

-Takes inputs from client -Decides what to be done next -Decides what shared data to access and manipulates it -Processes shared data

-Support multiple applications with common data -Protect critical data -Decouple data administration and application administration

Sun N-tier Sun N-Tier

Sun’s Performance

(1,048.0)(2,653.0)(3,429.0)(3,429.0)1,121.21,176.21,605.72,771.01,584.01,031.31,854.0(587.0)(388.0)(106.0)1,031.31,854.0(587.0)(388.0)(106.0) 1,627.01,716.0(461.0) 523.3708.9437.0738.0355.8476.4762.4762.9981.0 (54.0) 355.8476.4762.4762.9927.0 (0.18)(1.07)(0.12)(0.03)(0.18)(1.07)(0.12)(0.03) 1995199619971998199920002001200220032004 378.0273.0200.0167.5232.5358.8413.3574.4917.0603.0776.0825.0844.0 31493147311131543256337834173242319032773378 TTM 22.933.994.746.183.971.00.110.150.250.240.320.550.290.110.150.250.240.320.550.27------------------------------------------------------------------------------------------------

Net Income 355.8 476.4 762.4 762.9 1,031.3 1,854.0 927.0 (587.0) (3,429.0) (388.0) (106.0)

Today

„ 3-tier model common.

„ Sun’s version of 4-tier model not-common.

„ N-tier model where Webserver and

Application Server on separate equipment

also common.

„ Sun’s hardware business not strong.

‰ Linux on cheap PCs most common servers

‰ Microsoft desktops replacing Sun workstations

Today

„ Java

‰ Common in Server implementations

„ Example: Java Servlet implementing application logic
in a banking application.

‰ Often used to push simple applets onto client

‰ Not common

„ For “big” desktop applications
„ Office Suite in Java not popular

‰ Microsoft is still in business…

Architecture Example

Architecture

„ Conceptualization

‰ What is it you are trying to do?

„ Example Concept:

‰ Small HHC for flight attendants.
‰ HHC tells flight attendants which passengers are higher
priority.

„ Who paid the highest fares „ Who has been a more valuable customer in past

‰ Flight attendant discriminates based on this

„ Free drinks, meals, and pillows to valuable customers „ Ignore less valuable customers

Example Concept:

Architecture

„ How do you begin to architect a solution

for a problem like this?

„ Break it into modules!

Architecture

Airline Dataserver

HEADQUARTERS
HHC

HHC Server

Airline Intranet

Wireless Link

HHC Architecture

When a module is composed of sub-modules,

the architecture is hierarchical.

HHC Application

Palm OS

Networking Infrastructure

User Interface

Coordination With HHC Server

Data Management

HHC Architecture

We are using a layered architecture as well.

„ Allows reuse of previously built infrastructure.

HHC Application

Palm OS

Networking Infrastructure

User Interface

Communication With HHC Server

data management

Example data types

Integer

‰ “natural number between -32,767 and +32,768”
‰ Could be represented (in many ways) by 16 bits

„ since 2n^ = 65,

Float

‰ “number of the formm*10n/32768, wherem is in the
range -32,767 to +32,768 andn is in the range -255 to
‰ Could be represented by 16+8 = 24 bits

More data types

Character

‰ “values assuming a-z and A-Z plus space and

punctuation marks”

„ could be represented by 7 or 8 bits

Character string

‰ “collection ofn characters, wheren is

customizable”

„ could be represented by 7*n bits

Compound data types

Programmer-defined composition of basic

data types

Example:

Employee {

String name;
String address;
Integer year_of birth;
etc.

Interfaces

Computation of key statistics

N numbers of Float type

2 Numbers of float type that signify: Mean, Variance

Compute Mean and Variance

INTERFACE
PARAMETERS
RETURNS

Implementation

Computation of key statistics

Compute Mean and Variance

Implementation 1:

X^ i, i=1..N

MEAN, VARIANCE

„ One module should not be concerned with other module’s implementation ‰ Æ “Separation of concerns.” „ One module should see the other only through its interface – implementation details hidden. ‰ Æ Abstraction

Module A

Module B

HIDDEN From Module A!!

Implementation

Computation of key statistics

Compute Mean and Variance

Implementation 2:

X^ i, i=1..N MEAN, VARIANCE

„ Though different, this implementation is ok too.

„ We can choose the implementation details however we want, as long as we comply with the agreed interface.

Module A

Module B

Implementation

Computation of key statistics

Compute Mean and Variance

Implementation 1:

X^ i, i=1..N MEAN, VARIANCE

„ Should he use it?

‰ NO!!!! Why??

„ Either A should compute “SUM” himself, or

sit down with B and redesign the interface

Module A

Module B

“I need to get the sum, I’ll just take it from B”

Encapsulation

„ The designer of B might take measures to

hide “SUM” from A so that A is not able to

violate the agreed interface.

‰ Example: B does not declare “SUM” as a global

variable.

„ Making a modules implementation details

inaccessible to other modules is called

encapsulation.

Interfaces

Computation of key statistics

N numbers of Float type

2 Numbers of float type that signify: Mean, Variance

Compute Mean and Variance

INTERFACE
PARAMETERS
RETURNS

„ This simple interface example allows for only one action of module B. ‰ Action is “Compute mean and variance.”

„ Other examples are possible.

Module B

Module A

Possible software interface

action-
action-
action-

Menu of actions

Action 1: Compute mean

Action 2: Compute variance

Action 3: Compute mode

Etc..

Example:

Protocol

In addition to atomic actions, an interface

may define protocols

‰ Protocol == finitesequence of actions required

to achieve a higher level function

‰ One action can be shared by multiple protocols

‰ Multiple modules may participate in a protocol

Protocol Example

HHC Server

HHC

Hello: I’m the gate 32 server

Hello: I’m the HHC of Airplane#

Tell me about the passengers of my next flight

Return Weather Data

(Might be passed As an array of a compound data type “passenger,” which in turn is composed of standard types like integer, and string)

Tell me about the weather at my next destination.

Return Passenger Data

“Passengers noted”

These were the unruly passengers on last flight

Action: specify_account

Parameters

‰ Account (touch screen from menu of choices)

Internally, choice noted for all subsequent

actions (another example of state)

Returns

‰ None

Action: amount

Parameters

‰ Dollars_and_cents (typed on keypad)

Internally, amount noted (another example

of state)

Returns

‰ Success or failure (state dependent, for

example for a withdraw failure when

dollars_and_cents exceeds balance)

Protocol: cash_withdrawal

What is the sequence of actions?

Protocol: cash_withdrawal

authentication
choose objective
account
amount
failure
other objectives
no accounts
balance exceeded!

More on layering

by

David G. Messerschmitt

Goals

Understand better

‰ how layering is used in the infrastructure

‰ how it contains complexity

‰ how it coordinates suppliers

‰ how it allows new capabilities to be added

incrementally

Layer above is a client of the
layer below
Layer below as as a server
to the layer above
….by utilizing the services of the layer
below and adding capability
Each layer provides services
to the layer above….

Interaction of layers

Application module Application module
Host A Host B
Middleware
Operating system Operating system
Network
Middleware

Layering

Existing layers
Elaboration or specialization
Ú Ú Ú
Layering builds capability
incrementally by adding to what
exists

Three types of software

Application
•Infrastructure:
Basic services (communication, storage,
concurrency, presentation, etc.)
•Components and frameworks:
What is in common among applications

Part of Microsoft vs. DOJ

dispute

Application
Infrastructure
Components and frameworks
Microsoft
position
DOJ
position
Network
Operating system
Middleware
Application frameworks and components
Applications

Major layers

Example 3

HHC

HHC Server

HHC Server Application HHC Client Application

Passenger Information

Windows OS

message

Networking Infrastructure (Contains: TCP/IP, WiFi)

Collection of Packets (^) Networking Infrastructure (Contains: TCP/IP, WiFi)

Palm OS

message

Example 3: Network Infrastructure Expanded

HHC Server Application HHC Client Application

Passenger Information

Windows OS

message

TCP transport layer

Palm OS

message

WiFi Link Layer

Packets

WiFi Physical Layer

Networking Infrastructure

TCP transport layer

WiFi Link Layer

Packets

WiFi Physical Layer

Networking Infrastructure

Radio Signals

Example 4

HHC Server

HHC Server Application DBMS

Windows OS

message

Networking Infrastructure Layers within TCP/IP, WiFi

Collection of Packets (^) Networking Infrastructure Layers within: TCP/IP, WiFi

Unix OS

message

Airline Dataserver

HEADQUARTERS

“Send me today’s flight information”

Information in the

infrastructure

Sometimes it is appropriate for the

infrastructure to assume structure and

interpretation for data

‰ to add capabilities widely useful to applications

‰ to help applications deal with heterogeneous

platforms, where representations differ

At most, data types

Data and information

Application
Deals with information
Infrastructure
Deals with data types
Assumes structure and interpretation
Assumes standard data types