rationale for software architecture designbedir/cs411/slides/week 1-2...software architecture -bass...

31
1 Rationale for Software Architecture Design Bedir Tekinerdoğan Billkent University, Department of Computer Engineering e:mail - bedir@cs,bilkent..edu.tr http://www.cs.bilkent.edu.tr/~bedir/ © Bedir Tekinerdoğan Software Architecture Design 2 Contents Rationale for Software Architecture Definitions for Software Architecture Software Architecture in the Life Cycle Example Architecture Project Common Misconceptions

Upload: vuongkiet

Post on 26-Apr-2018

230 views

Category:

Documents


1 download

TRANSCRIPT

1

Rationale for Software

Architecture Design

Bedir Tekinerdoğan

Billkent University,

Department of Computer Engineering

e:mail - bedir@cs,bilkent..edu.tr

http://www.cs.bilkent.edu.tr/~bedir/

© Bedir Tekinerdoğan Software Architecture Design 2

Contents

Rationale for Software Architecture

Definitions for Software Architecture

Software Architecture in the Life Cycle

Example Architecture Project

Common Misconceptions

2

© Bedir Tekinerdoğan Software Architecture Design 3

Definitions for Software Architecture

© Bedir Tekinerdoğan Software Architecture Design 4

What is Architecture?

Architecture (Webster‟s):1: the art or science of building; specifically: the art or practice of designing and building structures and especially habitable ones

2 a>:formation or construction as or as if as the result of conscious act <the architecture of the garden> b: a unifying or coherent form or structure <the novel lacks architecture>

3: architectural product or work

4: a method or style of building

5: the manner in which the components of a computer or computer system are organized and integrated

3

© Bedir Tekinerdoğan Software Architecture Design 5

Architecture is ...

The structure of things:

Buildings

Vehicles

Computers

...

Software

© Bedir Tekinerdoğan Software Architecture Design 6

Discussion...

What is software architecture according to

you?

Software Architecture is …

4

© Bedir Tekinerdoğan Software Architecture Design 7

Software Architecture - Booch 1991

”The logical and physical structure of a system, forged

by all the strategic and tactical design decisions applied

during development”

Architecture is high level structure of software system

G. Booch. Object-Oriented Analysis and Design. Addison-Wesley, 1991

© Bedir Tekinerdoğan Software Architecture Design 8

Software Architecture - Perry and Wolf 92

“We distinguish three different classes of architectural

elements: processing elements; data elements; and

connection elements. The processing elements are those

components that supply the transformation on the data

elements; the data elements are those that contain the

information that is used and transformed; the connecting

elements (which at times may be either processing or data

elements, or both) are the glue that holds the different pieces

of the architecture together. “

explicitly considers the types of architectural components and

relations.

D.E. Perry & A.L. Wolf. Foundations for the Study of Software Architecture.

Software Engineering Notes. Vol. 17. No. 2. pp 40-52, 1992.

5

© Bedir Tekinerdoğan Software Architecture Design 9

Software Architecture - Garlan and Shaw 1993

“ ...beyond the algorithms and data structures of the computation; designing

and specifying the overall system structure emerges as a new kind of

problem. Structural issues include gross organization and global control

structure; protocols for communication, synchronization, and data access;

assignment of functionality to design elements; physical distribution;

composition of design elements; scaling and performance; and selection

among design alternatives. This is the software architecture level of design.

provides additional specializations of the structural issues

has led to so-called architectural styles

D. Garlan & M. Shaw. An Introduction to Software Architecture.

In. V. Ambriola and G. Tortora (eds.). Advances in Software Engineering and Knowledge

Engineering, Vol 2. World Scientific, 2003.

© Bedir Tekinerdoğan Software Architecture Design 10

Software Architecture– Garlan and Perry 1995

“The structure of the components of a program/system,

their interrelationships, and principles and guidelines

governing their design and evolution over time.”

design information in the architectural specification

D. Garlan & D. Perry. Introduction to the Special Issue on Software Architecture.

IEEE Transactions on Software Engineering, Vol. 21, No. 4, pp. 269-274, 1995.

6

© Bedir Tekinerdoğan Software Architecture Design 11

Software Architecture - IEEE 1471-2000

“Software architecture is the fundamental organization of a system, embodied in its components,

their relationships to each other and the environment,

and the principles governing its design and evolution”

IEEE. IEEE Product No. : SH94869-TBR: Recommended Practice for

Architectural Description of Software Intensive Systems. IEEE Standard No. 1471-2000.

Available at: http://shop.ieee.org/store/.

© Bedir Tekinerdoğan Software Architecture Design 12

Software Architecture - Bass et al. 2003

The software architecture of a program or computing

system is the structure or structures of the system, which

comprise software components, the externally visible

properties of those components, and the relationships

among them.

more than one structure and includes the behavior of the

components as part of the architecture. The term component here is

used as an abstraction of varying components.

L. Bass. P. Clements. R. Kazman. Software Architecture in Practice. Addison-Wesley, 2003.

7

© Bedir Tekinerdoğan Software Architecture Design 13

Summary on Definitions

Definition of Software Architecture Design has evolved

together with technical developments

Different definitions but a common agreement on

Architecture includes gross level structure

including components

and connections among these components

© Bedir Tekinerdoğan Software Architecture Design 14

Rationale for Software Architecture

8

© Bedir Tekinerdoğan Software Architecture Design 15

Discussion...

What is the rationale for software architecture

according to you?

© Bedir Tekinerdoğan Software Architecture Design 16

Rationale for Software Architecture

1. Improved understanding because of a higher level abstract specification

2. Vehicle for communication among different stakeholders because of a common abstract specification

3. Manifestation of the earliest design decisions

4. Guides software development process

5. Supports organization of development project

6. Provides gross level reuse

9

© Bedir Tekinerdoğan Software Architecture Design 17

1 – Abstract Specification

Abstraction

Focus only on relevant properties of the problem

„Ignore‟ details.

G. Booch. Object-Oriented Analysis and Design. Addison-Wesley, 1991

© Bedir Tekinerdoğan Software Architecture Design 18

Abstract Specification

Engine Chassis

Wheels Break

carries

rotates

stops

carries

carries

10

© Bedir Tekinerdoğan Software Architecture Design 19

Abstract Specification

Architecture

represents a high

level abstract

specification.

Abstraction helps to

cope with complexity

Abstraction improves

understanding of the

software system.from: RUP

© Bedir Tekinerdoğan Software Architecture Design 20

2 - Stakeholder Communication

Stakeholder is any person who has interest in the

architecture

Stakeholders:

end users

managers

developers

maintainers

analysts

Designer

11

© Bedir Tekinerdoğan Software Architecture Design 21

2 - Stakeholder Communication

Software architecture provides a common medium for communication among stakeholders

This will improve understanding of the system among stakeholders

© Bedir Tekinerdoğan Software Architecture Design 22

3 – Coping with Evolution

About 80% cost of a software system occurs after initial

deployment.

Software systems change over their lifetimes. Often!

Changes can be categorized into:

Local: change to a single element

Non-Local: change to multiple elements but leaves architecture

intact

Architectural: change is systemic, and affects the overal

structure

Effective Architecture is one in which the most likely

changes are also the easiest to make

12

© Bedir Tekinerdoğan Software Architecture Design 23

3 – Coping with Evolution

Architecture can help dealing with changes and

evolution.

In case of proper architecture definition, the changes will

be limited to the abstraction boundaries.

Architecture provides the balance between fixed and

adaptable parts of the system

“There is nothing permanent except change.”

~ Heraclitus

© Bedir Tekinerdoğan Software Architecture Design 24

Architecture is explicit

Focus on Architectural

Components.

Analyse and Design based on

architectural components.

DesignSoftware

Architecture

Problem

understandingAnalysis Implementation

4 - Guides Software Development Process

13

© Bedir Tekinerdoğan Software Architecture Design 25

The architecture influences the organizational structure

for development/maintenance efforts.

Examples include

division into teams

units for budgeting, planning

basis of work breakdown structure

organization of documentation

basis of integration

basis of test plans, testing

basis of maintenance

Incremental deployment

5 – Organization of the Development Project

© Bedir Tekinerdoğan Software Architecture Design 26

6 – Large Scale Reuse

Software Architecture is

an abstract specification

representing set of

systems

and as such can be

reused for systems

exhibiting similar

structure and

requirements

can promote software

product lines

Engine Chassis

Wheels Break

carries

rotates

stops

carries

carries

Car Architecture

14

© Bedir Tekinerdoğan Software Architecture Design 27

Common Misconceptions

© Bedir Tekinerdoğan Software Architecture Design 28

Architecture is…

Just paper

Design

Infrastructure

Technology

Structure

Is flat

Art

G. Booch. Handbook of Software Architecture, 2004.

15

© Bedir Tekinerdoğan Software Architecture Design 29

Architecture is just paper...

Every system has an architecture; either visible or not

The architecture eventually resides in executable code

A system‟s architecture may be visualized in models;

which can be executable

© Bedir Tekinerdoğan Software Architecture Design 30

Architecture vs. Design

All architecture is design, but not all design is architecture (e.g. detailed design)

Architecture focuses on significant design decisions, decisions that are both structurally and behaviorally important as well as those that have a lasting impact on the performance, reliability, cost, and resilience of the system

Architecture is at a higher abstraction level

16

© Bedir Tekinerdoğan Software Architecture Design 31

Architecture vs. Infrastructure

Infrastructure is an important part of architecture,

but architecture is more than just infrastructure

infrastructure could be just a view on the architecture

© Bedir Tekinerdoğan Software Architecture Design 32

Architecture vs. Technology

A given technology only serves to implement some

dimension of an architecture The network is the architecture

The transaction server is the architecture

J2EE is the architecture

Architecture is more than just a list of products

Architecture implementation is shaped by technology,

but a robust architecture is not directly bound to

technology

17

© Bedir Tekinerdoğan Software Architecture Design 33

Architecture vs. Structure

Architecture includes structure, but not every structure is

architecture

Architecture is an abstraction of underlying structures

Architecture is more than structure; it also involves

behavior, design decisions, constraints...

© Bedir Tekinerdoğan Software Architecture Design 34

Architecture - Views

Architecture is flat only in trivial systems in which one architectural view is sufficient

However, multiple stakeholders with multiple concerns lead to multiple architectural views

A complex system can usually not be presented using a single architectural view

18

© Bedir Tekinerdoğan Software Architecture Design 35

Architecture vs. Art

Current software applications are too complex

The “art” or creative part of software architecture

is minimal

Architecture design is an explicit rational activity

Several architecture design methods exist for

this purpose

© Bedir Tekinerdoğan Software Architecture Design 36

Software Architecture in the Life Cycle

19

© Bedir Tekinerdoğan Software Architecture Design 37

Phases

Requirements Analysis What? (client)

Analysis What? (domain)

Design How? (Detailed)

Implementation Do

Testing Test

Where is

Architecture

Design?

Software Engineering Phases

© Bedir Tekinerdoğan Software Architecture Design 38

Software Architecture - Design Phase

Requirements Analysis What? (client)

Analysis What? (domain, arch. comp)

Design How? (Detailed)

Implementation Do

Testing Test

Software Architecture What? (domain, gross-level)

Phases

20

© Bedir Tekinerdoğan Software Architecture Design 39

Design, Evaluate and Realize Architecture

Software Architecture Design

Requirements Analysis

Analysis & Design

Design

Realize (Implement)

Evaluate (Test)

© Bedir Tekinerdoğan Software Architecture Design 40

Influences on Software Architecture

21

© Bedir Tekinerdoğan Software Architecture Design 41

Influences on Architecture - Stakeholders

Different stakeholders

who have interest in the

architecture

Stakeholders have

different concerns

Some of the concerns

might be contradictionary

The architect must be

able to identify and

balance the stakeholders

concerns

© Bedir Tekinerdoğan Software Architecture Design 42

Influences on Architecture - Organization

An architecture is influenced by the structure or nature of the development

organization. Three classes of influence that come from the developing

organization:

immediate business

An organization may have an immediate business investment in certain assets,

such as existing architectures and the products based on them. The foundation

of a development project may be that the proposed system is the next in a

sequence of similar systems, and the cost estimates assume a high degree of

asset re-use.

long-term business,

An organization may wish to make a long-term business investment in an

infrastructure to pursue strategic goals and may view the proposed system as

one means of financing and extending that infrastructure.

organizational structure.

The organizational structure can shape the software architecture

22

© Bedir Tekinerdoğan Software Architecture Design 43

Influences on Architecture - Experience

Architecture is influenced by the background and

experience of the architect

From experience architect will use best practices and

avoid approaches did not work for earlier projects

Architectural choices may also come from an architect's

education and training, exposure to successful

architectural patterns, or exposure to systems that have

worked particularly poorly or particularly well.

© Bedir Tekinerdoğan Software Architecture Design 44

Influences on Architecture – Environment

Architectures are influenced by the technical

environment

Might include adopted tools, standard industry practices,

or software engineering techniques

23

© Bedir Tekinerdoğan Software Architecture Design 45

Influences on the Architecture

Architects are influenced by

the requirements for the

product as derived from its

stakeholders,

the structure and goals of the

developing organization,

the available technical

environment,

and their own background and

experience.

Architect needs more than just

technical skills. Diplomacy,

negotiation, and communication

skills are essential!

© Bedir Tekinerdoğan Software Architecture Design 46

Architecture Influences – Organization

The architecture affects the structure of the

developing organization it particularly prescribes the units of software that must be

implemented (or otherwise obtained) and integrated to form

the system.

These units are the basis for the development project's

structure.

The architecture can affect the goals of the

developing organization

A successful system built from architecture can

enable a company to establish a foothold in a

particular market area.

The architecture can provide opportunities for

the efficient production and deployment of

similar systems

and the organization may adjust its goals to take

advantage of its newfound expertise to plumb

the market.

24

© Bedir Tekinerdoğan Software Architecture Design 47

Architecture Influences - Requirements

The architecture can affect customer

requirements for the next system by

giving the customer the opportunity to

receive an enhanced system

The customer may be willing to relax

some requirements to benefit from the

architecture (reuse!)

© Bedir Tekinerdoğan Software Architecture Design 48

Architecture Influences - Environment

The Architecture will influence the technical environment.

A proper architecture might require standard industry

practices, architectural patterns, tools, software

engineering techniques

25

© Bedir Tekinerdoğan Software Architecture Design 49

Mutual Influences

Several factors influence

the architecture

The architecture

influences these factors…

A cycle of influence

© Bedir Tekinerdoğan Software Architecture Design 50

Example Software Architecture Project

26

© Bedir Tekinerdoğan Software Architecture Design 51

Trader Project

Industry-as-laboratory project

Television Related Architecture Design to

Enhance Reliability (Trader)

Context: Embedded Systems and in particular

consumer electronics (Digital TV)

Period: Sept.2004-Aug. 2009

10 partners (industrial and academic)

22 fte/yr, 7 PhDs, 2 Postdocs,

around 3-4 miljon euro

funded by The Netherlands Ministry of

Economical Affairs under the Bsik programme

Carrying Industrial Partner

ESI, Eindhoven:

project location

© Bedir Tekinerdoğan Software Architecture Design 52

Software that controls the system…

Slide from: B. Pronk, NXP (Philips Semiconductors)

27

© Bedir Tekinerdoğan Software Architecture Design 53

Conceptual Architecture DTV

«subsystem»

Command Handler

«subsystem»

Application Manager

«subsystem»

Program Manager

«subsystem»

Program Installer

«subsystem»

Content Browser

«subsystem»

Teletext«subsystem»

EPG

«subsystem»

Graphics Controller

«subsystem»

Last State Manager

«subsystem»

C/A

«subsystem»

Audio Controller

«subsystem»

Video Controller

«subsystem»

Tuner

«subsystem»

Video Processor

«subsystem»

Data Decoder & Interpreter

«subsystem»

Audio Processor

«subsystem»

Graphics

«subsystem»

Audio Out

«subsystem»

Video Out

«subsystem»

Communication Manager

Control Layer

Streaming Layer

Module Dependency (uses)KEY «subsystem»Layer

© Bedir Tekinerdoğan Software Architecture Design 54

Trader Context

The universal trend of the increased functionality, openness and shift from hardware to software puts serious challenges on quality factors such as performance, availability and reliability

In fact, embedded systems are now largely defined and controlled by software as such

the required quality factors are likewise more dependent on the quality of the adopted software and to a lesser degree on the hardware.

…it is expected that the risk of failures in embedded systems can increase to a mission critical level.

…to minimize this risk it is required that appropriate reliability analysis and design techniques are provided so that potential failures can be predicted or corrected in time.

28

© Bedir Tekinerdoğan Software Architecture Design 55

DTV Reliability Problems

Mode Confusion

Aspect Ratio Problems

Decreased Resolution

H. Sözer, C. Hofmann, B. Tekinerdogan, & M. Akşit. Detecting Mode Inconsistencies in Component-Based

Embedded Software, in proceedings of workshop on Architecting Dependable Systems, Edinburgh, Scotland, 2007.

© Bedir Tekinerdoğan Software Architecture Design 56

Three important steps for improving the reliability

1. Detect the unhealthy state at run-time;

2. Keep unhealthy state local;

3. Hide consequences for user and recover from the

unhealthy state.

All within the TV domain and its legacy, and also shaped

by the resource constraints.

29

© Bedir Tekinerdoğan Software Architecture Design 57

Some important issues to consider

1. It is not feasible to design a TV HW and SW architecture

with zero defects;

2. Localizing and recovering from failures is the only

feasible option: This implies a control system solution.

3. Due to different TV sub-systems it is not possible to

generalize the problem to a single control strategy: This

implies various control architectures dedicated to the TV

subsystems;

© Bedir Tekinerdoğan Software Architecture Design 58

4. Subsystems are connected together to form the TV

system: This implies coordinated distributed control

architecture;

5. There are a large set of control strategies shaped by the

resource constraints. Design and run-time strategies are

required to select the optimal strategy for a given TV

system: This requires techniques for dealing with large

problem & solution spaces and adaptive control

strategies.

Important features to consider

30

© Bedir Tekinerdoğan Software Architecture Design 59

• Is it possible to define a general TV SW HW

architecture?

• What are the variations/commonalities among multiple

TV systems? Common architecture

To design a stable control system, a common TV architecture

must be defined

© Bedir Tekinerdoğan Software Architecture Design 60

Designing various control architectures dedicated to the

TV subsystems:

• What is the domain & granularity of the control for

optimally localizing and recovering from the errors?

Control 1

Control 2

Control N

Determining the domain of control

31

© Bedir Tekinerdoğan Software Architecture Design 61

• What if the control architecture requires different

decomposition of the TV architecture so that errors can

be localized and handled?

• How to deal with the resource constraints?

Control 1

What is the trade-off between the control and TV

viewpoints?

© Bedir Tekinerdoğan Software Architecture Design 62

Summary

Software architecture design plays an important role in

structuring software

Several software architecture design definitions which have

evolved over the years

There is now a more mature understanding on the concept of

software architecture

Software architecture represents the high level abstraction

and as such

improves understanding of the system, supports stakeholder

communication, guides subsequent software development

process, supports the organization of project, and provides

gross level reuse.

Software architecture is influenced by stakeholder

requirements, organization, technical environment and

experience of the architect; and vice versa.