1 cs 501 spring 2002 cs 501: software engineering lecture 13 system architecture and design i

28
1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

Upload: milo-brown

Post on 27-Dec-2015

219 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

1 CS 501 Spring 2002

CS 501: Software Engineering

Lecture 13

System Architecture and Design I

Page 2: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

2 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?

Page 3: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

3 CS 501 Spring 2002

Project Presentations

Requirements Analysis

System design

Unit & Integration Testing

System Testing

Operation & Maintenance

Program design

Coding

Acceptance Testing

Requirements

Design

Implementation

Page 4: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

4 CS 501 Spring 2002

System Architecture and Design

The overall design of a system:

• 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)

Page 5: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

5 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)

Page 6: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

6 CS 501 Spring 2002

Data Intensive SystemsExample 1: Electricity Utility Billing

First attempt:

Data input Master fileTransaction Bill

Each transaction handled as it arrives.

Page 7: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

7 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!!!

Page 8: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

8 CS 501 Spring 2002

Transaction Types

• Create account / close account

• Meter reading

• Payment received

• Other credits / debits

• Check cleared / check bounced

• Account query

• Correction of error

• etc., etc., etc.,

Page 9: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

9 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

Page 10: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

10 CS 501 Spring 2002

Batch Processing: Validation

Data input

Master file

Edit & validation

read only

errors

Validated transactions

Incoming transactions

Page 11: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

11 CS 501 Spring 2002

Batch Processing: Master File Update

Master fileupdate

Bills

Validated transactionsin batches

Sort by account

errors Reports

Instructions

Page 12: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

12 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

Page 13: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

13 CS 501 Spring 2002

Online Inquiry

Master file

read only

Customer Service

Customer Service department can read file, make annotations, and create transactions, but not change the master file.

New transaction

Page 14: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

14 CS 501 Spring 2002

Data Intensive SystemsExample 2: A Small-town Stockbroker

• Transactions

Received by mail or over telephone

For immediate or later action

• Complex customer inquiries

• Highly competitive market

Page 15: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

15 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)

Page 16: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

16 CS 501 Spring 2002

Database Architecture

Customer & account database

Products & services database

External services

Page 17: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

17 CS 501 Spring 2002

Real-time Transactions

Customer & account database

Products & services database

External services

Real-time transactions

Page 18: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

18 CS 501 Spring 2002

Real-time Transactions & Batch Processing

Customer & account database

Products & services database

External services

Real-time transactions

Batch processing

Data input

Page 19: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

19 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 commitreload from checkpoint + logdetailed audit trail

• How will transaction errors be avoided?

• How will transaction errors be corrected?

• How will staff dishonesty be controlled?

Page 20: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

20 CS 501 Spring 2002

Data Intensive SystemsExample 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.

Page 21: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

21 CS 501 Spring 2002

Merger of Two Banks: Options

???

???

AA BB

Page 22: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

22 CS 501 Spring 2002

Merger of Two Banks: Architectural Options

I. Convert everything to System A:

convert databasesretrain staffenhance 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.

Page 23: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

23 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.

Page 24: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

24 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?

Page 25: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

25 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) pipes and filters

(b) objects

(c) implicit invocation (event-driven)

(d) layering

(e) repositories

(f) interpreters

(g) process control

Do you have a preferred style?

Page 26: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

26 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?

Page 27: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

27 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?

Page 28: 1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 13 System Architecture and Design I

28 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?

(a) Prototyping design

(b) Fault-tree analysis

(c) Design by contract

(d) Reducing complexity