software architecture: design decisions

31
Università degli Studi dell’Aquila L06: Design Decisions Henry Muccini DISIM Department, Universityof L’Aquila [email protected]

Upload: henry-muccini

Post on 09-May-2015

5.682 views

Category:

Education


0 download

DESCRIPTION

This is an introductory lecture to Software Architecture Design Decisions, part of the Advanced Software Engineering course, at the University of L'Aquila, Italy (www.di.univaq.it/muccini/SE+/2012)

TRANSCRIPT

Page 1: Software Architecture: Design Decisions

Università degli Studi dell’Aquila

L06: Design Decisions

Henry Muccini

DISIM Department, University of L’Aquila

[email protected]

Page 2: Software Architecture: Design Decisions

The material in these slides may be freely reproduced and

distributed, partially or totally, as far as an explicit

reference or acknowledge to the material author is

preserved.

Some of the slides have been originally made by prof.

Patricia Lago.Patricia Lago.

Thanks to Smrithi for the discussion we had on the topic

Henry Muccini

Page 3: Software Architecture: Design Decisions

Intro to Software Testing

Structural Testing

Model-based Testing

Architecture-based Testing

Lab

Intro to SA

SA Case study

SA style

ADLs

Design Decisions

Views/Viewpoints

Non Functional S.E.

Performance modeling

Performance analysis

UML

UML Profiling

Lab

Views/Viewpoints

Page 4: Software Architecture: Design Decisions

Software Architecture

The Software Architecture is the earliest model of the whole software system created along the software lifecycle

“Traditional” definition:

→A set of components and connectors communicating through →A set of components and connectors communicating through interfaces

“Recent/Future” understanding:

→A set of architecture design decisions taken to generate the architecture artifact

→Focus on set of Views and Viewpoints, looking at stakeholders and their concern

Page 5: Software Architecture: Design Decisions

Architecting today

Architecting is the process of creating software

architecture knowledge and artifacts for engineering

software systems

A Software Architecture consists of

→A blueprint for the chosen solution (product)

→A set of design decisions (co-product)

Page 6: Software Architecture: Design Decisions

Architecture as a set of Design Architecture as a set of Design

Decisions

Page 7: Software Architecture: Design Decisions

Design Rationale and Design Decision

Design is a problem-solving process whose objective is to find and describe a way:

�To implement the functional requirements...�while respecting the non-functional requirements �and yet deliver 'good' quality

The result of software Design:

�A blueprint for the chosen solution (product)

�A set of design decisions (co-product)

Page 8: Software Architecture: Design Decisions

A designer is faced with a series of design issues

�These are sub-problems of the overall design problem.

�Each issue normally has several alternative solutions (or

design options)

�The designer makes a design decision to resolve each issue.�The designer makes a design decision to resolve each issue.

This process involves choosing the best option

from among the alternatives.

Page 9: Software Architecture: Design Decisions

Taking decisionsDesignproblem

sub-problem(or issue)

sub-problem (or issue)

Problem space

Designoption

Designoption

Designoption

Designoption

Solution space

Alternativesolutions

Alternativesolutions

Decision =best option

Decision =best option

Best, with respect to

some criterion

Page 10: Software Architecture: Design Decisions

Design space

The space of possible designs that could be achieved

by choosing different sets of alternatives.

web browserbased

fat-client

architecture

client-server

peer clients

thin-client

rich-client

based

custom clientprogram

clientstyle

layered

peer-to-peer

architecturestyle

structured p2p

unstructured p2p

hybrid p2p

tiered

...

Page 11: Software Architecture: Design Decisions

Taking decisions /2

To take each design decision, the software engineer

uses:

→“current” knowledge

─ the requirements

─ the design as created so far

→and “past” knowledge

─ the technology available

─ what has worked well in the past

─ software design principles and “best practices”

Page 12: Software Architecture: Design Decisions
Page 13: Software Architecture: Design Decisions

�Collection of Requirements and Constraints

�Identification of Design Issues

�Identification of Design Alternatives

�Identification of Design Decisions (DDs)�Identification of Design Decisions (DDs)

�Selection of architectural Components

�Selection of an architectural Solutions that comply to

the DDs

Page 14: Software Architecture: Design Decisions

Design Issue 1: how many gateways shall be used to collect sensored data in a building?

Design Issue2: how to propagate the collected data to the fire station?

Design Issue 3: how the sensors are connected?

Design Issue 4: how the sensors should be powered?

Design Issue 5: how to sense how many people are present in the building?

Page 15: Software Architecture: Design Decisions

DI1: how many

Single

Gateway Cost

Design Issue

Design

alternativesCriteria

DI1: how many

gateways shall be

used to collect

sensored data in a

building?

1 gateway per

floor

1 Gateway per

apartment

Reliability

Availability

Page 16: Software Architecture: Design Decisions

DD1: one gateway per floor

DD2: WAN

DD3: Wireless Lan

DD4: batteryDD4: battery

DD5: counting

sensors

Page 17: Software Architecture: Design Decisions

DD1: only one gateway

DD2: WAN

DD3: LAN

DD4: batteryDD4: battery

DD5: counting

sensors

Page 18: Software Architecture: Design Decisions

Why DD?

According to Anton Jansen and Jan Bosch [4], defining

Architecture as a set of design decisions helps the

architect to:

a. Guard the conceptual Integrity of the Software architecture

b. Communicate effectively the design space explorationb. Communicate effectively the design space exploration

c. Effectively analyze the software architecture and design

process

d. Trace design decisions and their relationship to the

resulting architecture.

Page 19: Software Architecture: Design Decisions

Notations and Tools

Archium: A meta-model and tool developed my Anton Jansen et al

ADDSS: a web based tool developed by Rafael Capilla et al

AREL: a rationale based model developed by Antony Tang et al

DAMSAK: Data Model for Software Architecture Knowledge

developed by Babar et aldeveloped by Babar et al

PAKME : a tool that supports DAMSAK

SEURAT: Software Engineering using Rationale, which integrates tools

for rationale capture, visualization, and use into a standard software

engineering environment

Page 20: Software Architecture: Design Decisions

QOC

Questions, Options, Criteria

Questions: key design issues

Options: possible answers

Criteria: assess and compare the optionsCriteria: assess and compare the options

Page 21: Software Architecture: Design Decisions

Example

QOC3 Which technology should be used by the user to

communicate locally with the devices which are

located at home?

Page 22: Software Architecture: Design Decisions

QOC3 Which technology should be used by the user to

communicate locally with the devices which are

located at home?

Page 23: Software Architecture: Design Decisions

QOC Template (Open the Excel File)

Page 24: Software Architecture: Design Decisions

ADD: what is interesting to discuss?

1. Granularity of design decisions

2. Dependencies among decisions

3. ADD taken in a collaborative way

4. ADD that uses genetic algorithms in order to find4. ADD that uses genetic algorithms in order to find

the optimal solution

5. Evolving ADD

Page 25: Software Architecture: Design Decisions

Granularity…

ADD Question:

� How the FireFighter system components shallcommunicate?

� How is the payment handled?

Page 26: Software Architecture: Design Decisions

DI1. How many

gateways can we

place?

Single Gateway

1 Gateway per floor

1 Gateway per

apartment

CostReliability

Availability

DI2. how the

sensors are

connected?Wired

Wireless Wi-Fi

Wireless

ZigBee

Installation

Performance

Availability

Enables decision

DI3.How should

data be broadcasted

Using gateways

Directly through

sensors

Cost

Reliability

Availability

Enables question

Dependencies…

Which device can

the Firefighter Use?

Wearable sensor

Mobile-Wi-Fi

Enables decision

Best way to get a

city map for the

truck manager

Online map

Local offline GPS device

Enables decision

Reliability

Performance

Availability

Page 27: Software Architecture: Design Decisions

Dependencies…

Are of various types:

• Excludes

• Requires

• Depends On

• Subsumes

• Enables

• …

Con#1: Which kind of technology is used for node-to-node Con#1: Which kind of technology is used for node-to-node

communication?

� Con#1-Opt#1 : Bluetooth

� Con#1-Opt#2 : Wi-Fi

� Con#1-Opt#3: Zigbee

Con#5: How the WSN infrastructure shall communicate with the trucks and central station?

� Con#5-Opt#1 – 3G

� Con#5-Opt#2 – GPRS

� Con#5-Opt#3 – Wi-Fi

Page 28: Software Architecture: Design Decisions

Collaborative Decision Making

http://saw.inf.unisi.ch/drupal/home

Page 29: Software Architecture: Design Decisions

Collaborative Decision Making

Page 30: Software Architecture: Design Decisions

Optimal Solution to ADD

Tariq Al-Naeem, Ian Gorton, Muhammed Ali Babar, Fethi Rabhi and Boualem Benatallah. “A Quality-Driven

Systematic Approach for Architecting Distributed Software Applications”. In Proc. ICSE 2005.

Page 31: Software Architecture: Design Decisions

Evolving ADD

Requirements, Concerns, technology evolves, and so

the associated design decisions.

Con#2: How the nodes should be powered?

• Cr#1 – Cost

• Cr#2 – nodes life duration

• Cr#3 – availability

• Opt#1 : Battery

• Opt#2 : Electrical network