Software Architecture: Introduction to the abstraction (May 2014_Split)

50
Università degli Studi dell’Aquila 1 Software Architecture: introduction to the abstraction Henry Muccini DISIM, University of L’Aquila [email protected] , @muccinihenry, www.henrymuccini.com @University of SPLIT, Croatia – May 2014

description

This is an introductory presentation on Software Architecture that I made at the University of Split, in Croatia. It shows what does it mean abstraction and why it is so important.

Transcript of Software Architecture: Introduction to the abstraction (May 2014_Split)

Page 1: Software Architecture: Introduction to the abstraction (May 2014_Split)

Università degli Studi dell’Aquila

1

Software Architecture: introduction to the abstraction

Henry Muccini DISIM, University of L’Aquila

[email protected], @muccinihenry, www.henrymuccini.com

@University of SPLIT, Croatia – May 2014

Page 2: Software Architecture: Introduction to the abstraction (May 2014_Split)

2

Wel

com

e

W

E

L

C

O

M

E

Page 3: Software Architecture: Introduction to the abstraction (May 2014_Split)

Copyright Notice

The material in these slides may be freely reproduced and distributed, partially or totally, as far as an explicit reference or acknowledge to the authors is preserved.

Henry Muccini

Page 4: Software Architecture: Introduction to the abstraction (May 2014_Split)

Myself

Researcher at the University of L’Aquila, Italy Ph.D. in Computer Science in year 2002 PostDoc at the University of California, Irvine Assistant Professor since 2002 at the University of

L’Aquila

Teaching Advanced Software Engineering Advanced Software Engineering Project UML for Web Applications

4

Page 5: Software Architecture: Introduction to the abstraction (May 2014_Split)

Myself

Research Software Architecture Software Testing, verification and validation Model Driven Engineering Mobile Applications

Services GSEEM (www.gseem.eu) European Double Degree in

Global Software Engineering [coordinator] EUROWEB Erasmus Mundus action 2, [local coordinator]

5

Page 6: Software Architecture: Introduction to the abstraction (May 2014_Split)

Closest airports: Rome Fiumicino, Rome Ciampino, Pescara

1 hour driving from Rome

45 mins driving to the cost

15 minutes driving to the mountains

L’Aquila: where is it?

Page 7: Software Architecture: Introduction to the abstraction (May 2014_Split)

Very close to…

Pescara,Teramo, Giulianova, Alba Adriatica, Roseto,…

Campo Imperatore, Campo Felice, Gran

Sasso

Page 8: Software Architecture: Introduction to the abstraction (May 2014_Split)

SOFTWARE ARCHITECTURE: INTRODUCTION TO THE ABSTRACTION

11

Page 9: Software Architecture: Introduction to the abstraction (May 2014_Split)

Software Engineering

Engineered Software SystemSoftware System

Page 10: Software Architecture: Introduction to the abstraction (May 2014_Split)

Software Architecture

Implementation

Low Level Design

Process: Architecture as an artefact

Requirements

Drives

Page 11: Software Architecture: Introduction to the abstraction (May 2014_Split)

Process: Architecture towards the process

• The architecture includes a collection of views• The architecture is NOT a single fase in the software

development process

Views

Models

Use CaseModel

DesignModel

Depl.Model

Impl.Model

TestModel

AnalysisModel

Page 12: Software Architecture: Introduction to the abstraction (May 2014_Split)

Ok, but, …What is an architecture?!!

Page 13: Software Architecture: Introduction to the abstraction (May 2014_Split)

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

A set of components and connectors communicating through interfacesA set of architecture design decisionsFocus on set of views and viewpointsWritten according to architectural styles

Soft

war

e A

rchi

tect

ure

Page 14: Software Architecture: Introduction to the abstraction (May 2014_Split)

Software Architecture definitions

Perry and Wolf, ’92 (aspects):→“Architecture is concerned with the selection of architectural elements, their interactions, and the constraints on those elements and their interactions necessary to provide a framework in which to satisfy the requirements and serve as a basis for the design.”

→Elements are divided into processing elements, data elements and connection elements

Garlan and Shaw, ’93 (elements):→ Architecture for a specific system may be captured as “a collection of computational components - or simply components - together with a description of the interactions between these components - the connectors –”

Page 15: Software Architecture: Introduction to the abstraction (May 2014_Split)

18

Let us reason about the Gaudi’s Sagrada Familia

Soft

war

e/Sy

stem

Arc

hite

ctur

e

Page 16: Software Architecture: Introduction to the abstraction (May 2014_Split)

The power of abstraction…

19

Page 17: Software Architecture: Introduction to the abstraction (May 2014_Split)

STM-4/16

ADMADM

ADMADM

STM-1/4

ADMADM

ADMADM ADMADM

SXC4/1

SXC4/1

Urban Level

SXASXA

STM-1/4

ADMADM

ADMADM ADMADM

ADMADM

STM-4/16

ADMADM

ADMADM

Regional level

STM-1/4

ADMADM

ADMADM

ADMADM ADMADM

SXASXA

TELECOM ITALIA NETWORK ARCHITECTURE

WDM

STM-4/16

ADMADM

ADMADM

SXASXA

WLWL

STM-16 Ring

National Level

ADMADMADMADM

ADMADM

ADMADMADMADM

ADMADM

ADMADMADMADM

ADMADM WLWL ADMADMADMADM

ADMADM

ADMADMADMADM

ADMADM

ADMADMADMADM

ADMADM

STM-16 Ring

Exam

ple

Page 18: Software Architecture: Introduction to the abstraction (May 2014_Split)

Exam

ple:

Ecl

ipse

Arc

hite

ctur

e

Java Development

Tools

Plugin Development Environment

JFace

SWT

Workbench

WorkspaceRuntime

User Interface

Core

Page 19: Software Architecture: Introduction to the abstraction (May 2014_Split)

eGov Architecture: basics

standard

standardstandard

standard

standard

process

laws

Page 20: Software Architecture: Introduction to the abstraction (May 2014_Split)

(some of the) Requirements for e-Gov

Privacy e confidentiality

Autenticity

Need of Standards

Shared Process Management

Scalability

Docs digitalization

Page 21: Software Architecture: Introduction to the abstraction (May 2014_Split)

SA General workflow

Architectural constraints and requirements

Ideas

Constraints

Req1:..Req2:..Req3:..………

Architectural requirements

C2

C3C1

C4

Software Architecture

Software Architecture

synthesis

Evaluation and Decisions making

Page 22: Software Architecture: Introduction to the abstraction (May 2014_Split)

SA with Decentralized data SA with Centralized Data

But which Architecture?

Implications on privacy, confidentiality, performance, scalability, maintainability, etc.

Page 23: Software Architecture: Introduction to the abstraction (May 2014_Split)

SA with Centralized Data, v1

But which Architecture?

Implications on privacy, confidentiality, performance, scalability, maintainability, etc.

SA with Centralized Data, v2

Page 24: Software Architecture: Introduction to the abstraction (May 2014_Split)

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

A set of components and connectors communicating through interfacesA set of architecture design decisionsFocus on set of views and viewpointsWritten according to architectural styles

Soft

war

e A

rchi

tect

ure

SA with Centralized

Data, v1

SA with Centralized

Data, v2

Page 25: Software Architecture: Introduction to the abstraction (May 2014_Split)

Architecture Design Decisions

Decisions about:

Selected components/interfaces/connectorsDistribution/Configuration of

components/connectorsExpected behavior

SA Styles, Patterns and TacticsHW/SW/Deployment and other views

Components’ Nesting and sub-systemsNF attributes

Page 26: Software Architecture: Introduction to the abstraction (May 2014_Split)

Architecture as a set of design decisions29

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

Designproblem

sub-problem

(or issue)

sub-problem (or issue)

Designoption

Designoption

Designoption

Designoption

Problem space

Solution space

Alternativesolutions

Alternativesolutions

Decision =best option

Decision =best option

Best, with respect to some

criterionJansen, A.; Bosch, J., "Software Architecture as a Set of Architectural Design Decisions," Software Architecture, 2005. WICSA 2005. 5th Working IEEE/IFIP

Conference on , vol., no., pp.109,120, 2005. doi: 10.1109/WICSA.2005.61

Page 27: Software Architecture: Introduction to the abstraction (May 2014_Split)

But, which is the right abstraction!?!

30

Page 28: Software Architecture: Introduction to the abstraction (May 2014_Split)

the right abstraction…31

Page 29: Software Architecture: Introduction to the abstraction (May 2014_Split)

SA with Centralized Data, v1

At which abstraction?

Implications on privacy, confidentiality, performance, scalability, maintainability, etc.

SA with Centralized Data, v2

Page 30: Software Architecture: Introduction to the abstraction (May 2014_Split)

and, which is the right architecture!?!

34

Page 31: Software Architecture: Introduction to the abstraction (May 2014_Split)

the right architecture…35

Architectural constraints and requirements

Ideas

Constraints

Req1:..Req2:..Req3:..………

Architectural requirements

C2

C3C1

C4

Software Architecture

Software Architecture

synthesis

Evaluation and Decisions making

The one that satisfies at best the requirements and constraints

The “less” risky one

Page 32: Software Architecture: Introduction to the abstraction (May 2014_Split)

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

A set of components and connectors communicating through interfacesA set of architecture design decisionsFocus on set of views and viewpointsWritten according to architectural styles

Soft

war

e A

rchi

tect

ure

Page 33: Software Architecture: Introduction to the abstraction (May 2014_Split)

Views and Viewpoints

Page 34: Software Architecture: Introduction to the abstraction (May 2014_Split)

38

Architectural Views Vie

ws

User1

Router Server

Timer

AlarmUR AlarmRS (c)Check1

Nofunc

Clock

AckSR (c)

AckRU1

User2

AlarmUR1

AlarmUR2

Check2

Check

AckRU2

0 12

3

4

5

Page 35: Software Architecture: Introduction to the abstraction (May 2014_Split)

ISO/IEC/IEEE 42010: 2011

ISO/IEC/IEEE 42010 - International Standard for Systems and Software Engineering – Architectural Description, 2011

Page 36: Software Architecture: Introduction to the abstraction (May 2014_Split)

Logical View

End-user

Functionality

Implementation (Development) View

Programmers Software management

Process View

PerformanceScalability

Throughput

System integrators

Deployment View

Conceptual Physical

Use Case View

Object Model of Design

Static Organization of the Software

Concurrency and Synchronization

Software Mapping To HwSystem engineering

System topology Delivery, installation

Communication

RUP 4+1 views

Page 37: Software Architecture: Introduction to the abstraction (May 2014_Split)

Multiple views

Using multiple views has become standard practice in industry

• IEEE Std 1471 (2000) -> … -> ISO/IEC/IEEE 42010 (2011) • Based on a survey we conducted with 48 practitioners

[Survey2012], and about the usage of ALs in industry 85% uses multiple views

[Survey2012] “What Industry needs from Architectural Languages: A Survey”, I. Malavolta, P. Lago, H. Muccini, P. Pelliccione, A. Tang (under review)

Page 38: Software Architecture: Introduction to the abstraction (May 2014_Split)

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

A set of components and connectors communicating through interfacesA set of architecture design decisionsFocus on set of views and viewpointsWritten according to architectural styles

Soft

war

e A

rchi

tect

ure

Page 39: Software Architecture: Introduction to the abstraction (May 2014_Split)

Prescriptive vs descriptive

Prescriptive vs descriptive use of an architectural language

Descriptive = unconstraintPrescriptive = constraint

Page 40: Software Architecture: Introduction to the abstraction (May 2014_Split)

Architectural Styles

“A set of design rules that identify the kinds of components and connectors that may be used to compose a system or subsystem, together with local or global constraints on the way the composition is done” (Shaw & Clements, 1996)

A set of constraints you put on your development to elicit desirable properties from your software architecture.

Constraints may be:TopologicalBehavioralCommunication-orientedetc. etc.

IMP

Page 41: Software Architecture: Introduction to the abstraction (May 2014_Split)

The Classical Style

The Gothic Style

The Californian Style

Page 42: Software Architecture: Introduction to the abstraction (May 2014_Split)

Architectural Styles

“A set of design rules that identify the kinds of components and connectors that may be used to compose a system or subsystem, together with local or global constraints on the way the composition is done” (Shaw & Clements, 1996)

A set of constraints you put on your development to elicit desirable properties from your software architecture.

Constraints may be:TopologicalBehavioralCommunication-orientedetc. etc.

IMP

Page 43: Software Architecture: Introduction to the abstraction (May 2014_Split)

Some Architectural Styles47

Application

Presentation

Session

Transport

Network

Data Link

Physical

Application

Presentation

Session

Transport

Network

Data Link

Physical

Network

Data Link

Physical

Network

Data Link

Physical

Page 44: Software Architecture: Introduction to the abstraction (May 2014_Split)

but... why to care?

48

Page 45: Software Architecture: Introduction to the abstraction (May 2014_Split)

Why to care?

All the software systems have an architecture All the critical/complex systems must have it carefully and

explicitly specified

Architecture-level decisions impact the scalability, performance, testability, functioning of the produced system

Even if the code is perfectly written, a wrong architecture produces a wrong system

Page 46: Software Architecture: Introduction to the abstraction (May 2014_Split)

Why to care?

A wrong architecture produces a wrong system Electronic Voting Systems Bad architecting of FT software:

Tens of thousands of people around the large cities weren’t able to travel by train Thursday morning. No trains from and to Amsterdam and Airport Schiphol from early morning until after the morning rush hour. A failure in the back-up system was the cause. The system therefore didn’t start. And then the signals and switches could not be operated. Both primary and backup failed, hence no operations. (april 2012)

the Interim Report on Causes of the August 14th 2003 Blackout in the US and Canada clearly shows that the problem was mostly caused by badly designed fault tolerance, including various architectural issues: poor diagnostics of component failures, longer-than-estimated time for component recovery, failure to involve all necessary components in recovery, inconsistent system state after recovery, failures of alarm systems. (2003)

Denver Airport

Page 47: Software Architecture: Introduction to the abstraction (May 2014_Split)

Why to care?

The Best Jobs of 2014“For the first time, our No. 1 job overall isn’t from the health care industry, it’s a tech job.” [http://goo.gl/WdxMjh]

Page 48: Software Architecture: Introduction to the abstraction (May 2014_Split)

“Bad” Architecting

A bad architecture can imply a spaghetti code system

Page 49: Software Architecture: Introduction to the abstraction (May 2014_Split)

53

Page 50: Software Architecture: Introduction to the abstraction (May 2014_Split)

Some ReferencesPerry, D. E.; Wolf, A. L. (1992). "Foundations for the study of software architecture". ACM SIGSOFT Software Engineering Notes 17 (4): 40.doi:10.1145/141874.141884.

Garlan & Shaw (1994). "An Introduction to Software Architecture". Retrieved 2012-09-13.

ISO/IEC/IEEE (2011). "ISO/IEC/IEEE 42010:2011 Systems and software engineering -- Architecture description". Retrieved 2012-09-12.

Kruchten, Philippe (1995, November). Architectural Blueprints — The “4+1” View Model of Software Architecture. IEEE Software 12 (6), pp. 42-50.

Len Bass, Paul Clements, Rick Kazman: Software Architecture in Practice, Third Edition. Addison Wesley, 2012, ISBN 0-321-81573-4 (This book, now in third edition, eloquently covers the fundamental concepts of the discipline. The theme is centered around achieving quality attributes of a system.)

54