CS 501 Spring 2002

Download Report

Transcript CS 501 Spring 2002

CS 501: Software Engineering
Lecture 13
System Architecture and Design I
1
CS 501 Spring 2002
Administration
• Quiz 2. Pick up after class or from Rosemary
Adessa, Upson 5147
• Assignment 2. Remember to submit
(a) requirements report
(b) individual questionnaires
• Project presentations on Wedneday afternoon. Can
you start 15 minutes earlier than scheduled?
2
CS 501 Spring 2002
Project Presentations
Requirements
Requirements Analysis
System design
Design
Program design
Implementation
Coding
Unit & Integration Testing
System Testing
Acceptance Testing
Operation & Maintenance
3
CS 501 Spring 2002
System Architecture and Design
The overall design of a system:
•
•
•
•
•
•
4
Computers and networks (e.g., monolithic, distributed)
Interfaces and protocols (e.g., http, CORBA)
Databases (e.g., relational, distributed)
Security (e.g., smart card authentication)
Operations (e.g., backup, archiving, audit trails)
Software environments (e.g., languages, source control tools)
CS 501 Spring 2002
A. Data Intensive Systems
Examples
•
Electricity utility customer billing
• Telephone company call recording and billing
•
Car rental reservations (e.g., Hertz)
•
Stock market brokerage (e.g., Charles Schwab)
• E-commerce (e.g., Amazon.com)
5
CS 501 Spring 2002
Data Intensive Systems
Example 1: Electricity Utility Billing
First attempt:
Transaction
Data input
Master file
Bill
Each transaction handled as it arrives.
6
CS 501 Spring 2002
Criticisms of First Attempt
Where is this first attempt weak?
• A bill is sent out for each transaction, even if there are several
per day
• Bills are not sent out on a monthly cycle
• No way to answer customer queries
• No process for error checking and correction
• All activities are triggered by a transaction
The requirements have not been specified!!!
7
CS 501 Spring 2002
Transaction Types
•
•
•
•
•
•
•
•
8
Create account / close account
Meter reading
Payment received
Other credits / debits
Check cleared / check bounced
Account query
Correction of error
etc., etc., etc.,
CS 501 Spring 2002
Typical Requirements
• All payments to be credited on day received
• Customers must be able to query account by telephone
• Cutting off service for non-payment requires
management authorization
• Data input staff should process n transactions per day
per person
• Error rate must be below 0.01%
• System available 99.9% of business hours
9
CS 501 Spring 2002
Batch Processing: Validation
errors
Edit &
validation
Incoming
transactions
Validated
transactions
Data input
read only
Master file
10
CS 501 Spring 2002
Batch Processing: Master File Update
Validated
transactions
in batches
errors
Sort by
account
Master file
update
11
Reports
Bills
Instructions
CS 501 Spring 2002
Benefits of Batch Updating
• All transactions for an account are processed together
at appropriate intervals
• Backup and recovery have fixed checkpoints
• Better management control of operations
• Efficient use of staff and hardware
12
CS 501 Spring 2002
Online Inquiry
Customer
Service
read only
New
transaction
Master file
Customer Service department can read file, make annotations,
and create transactions, but not change the master file.
13
CS 501 Spring 2002
Data Intensive Systems
Example 2: A Small-town Stockbroker
• Transactions
Received by mail or over telephone
For immediate or later action
14
•
Complex customer inquiries
•
Highly competitive market
CS 501 Spring 2002
A Database Architecture
Database(s):
• Customer and account database
• Financial products (e.g., account types, pension plans,
savings schemes)
• Links to external databases (e.g., stock markets, mutual
funds, insurance companies)
15
CS 501 Spring 2002
Database Architecture
Products &
services database
16
Customer &
account database
External
services
CS 501 Spring 2002
Real-time Transactions
Real-time
transactions
Products &
services database
17
Customer &
account database
External
services
CS 501 Spring 2002
Real-time Transactions & Batch
Processing
Real-time
transactions
Products &
services database
18
Data
input
Batch
processing
Customer &
account database
External
services
CS 501 Spring 2002
Architectural considerations
• Real-time service during scheduled hours with batch
processing overnight
• Combine information from several databases
• Database consistency after any type of failure
two-phase commit
reload from checkpoint + log
detailed audit trail
• How will transaction errors be avoided?
• How will transaction errors be corrected?
• How will staff dishonesty be controlled?
19
CS 501 Spring 2002
Data Intensive Systems
Example 3: Merger of Two Banks
Each bank has a database with its customer accounts. The
databases are used by staff at many branches and for back-office
processing.
The requirement is to integrate the two banks so that they appear
to the customers to be a single organization and to provide
integrated service from all branches.
This is an example of working with legacy systems.
20
CS 501 Spring 2002
Merger of Two Banks: Options
A
???
B
???
21
CS 501 Spring 2002
Merger of Two Banks:
Architectural Options
I.
Convert everything to System A:
convert databases
retrain staff
enhance System A (software and hardware)
discard System B
II. Build an interface between the databases in
System A and System B.
III. Extend client software so that it can interact with
either System A or System B database.
22
CS 501 Spring 2002
Discussion of Pfleeger, Chapter 5
Format:
State a question.
Ask a member of the class to answer.
(Sorry if I pronounce your name wrongly.)
Provide opportunity for others to comment.
When answering:
Stand up.
Give your name or NetID. Make sure the TA hears it.
Speak clearly so that all the class can hear.
23
CS 501 Spring 2002
Question 1: Design Review
(a) What is the purpose of a design review?
(b) Suppose that you are organizing a preliminary
design review:
i
Who should be present?
ii What role does each individual have?
(c) What do you see as the benefits of a preliminary
design review?
24
CS 501 Spring 2002
Question 2: Architectural Styles
Explain the following seven architectural styles identified by
Shaw and Garlan. Give examples. What are the benefits of each?
(a)
(b)
(c)
(d)
(e)
(f)
(g)
pipes and filters
objects
implicit invocation (event-driven)
layering
repositories
interpreters
process control
Do you have a preferred style?
25
CS 501 Spring 2002
Question 3: Collaboration
Suppose that you developing a major real-time system in the
United States (e.g., a parcel tracking system for Federal
Express). The programming will be subcontracted to one of
the leading software houses in India.
(a) How would you organize the project to accommodate
this arrangement?
(b) Suppose that at a late stage in the project it was decided
to use a different subcontractor somewhere else in the
world. What factors would you be paying special
attention to?
26
CS 501 Spring 2002
Question 4: Components
(a) What does it mean to say that components are
highly coupled or loosely coupled? What factors
determine the degree of coupling?
(b) Would you expect object oriented components to
he highly coupled?
(c) Distinguish between:
i content coupling and common coupling
ii stamp coupling and data coupling
(d) What is component cohesion?
27
CS 501 Spring 2002
Question 5: Techniques for Improving
Design
The book has four topics under this heading. What are
the strengths and difficulties with each? When would
each be used?
28
(a)
Prototyping design
(b)
Fault-tree analysis
(c)
Design by contract
(d)
Reducing complexity
CS 501 Spring 2002