Software Architecture - NASA

30
Software Architecture David Garlan Carnegie Mellon University NASA Fault Management Workshop New Orleans April 2012

Transcript of Software Architecture - NASA

Page 1: Software Architecture - NASA

Software Architecture

David Garlan Carnegie Mellon University

NASA Fault Management Workshop New Orleans April 2012

Page 2: Software Architecture - NASA

4/14/2012 Garlan 2

About me

n  Professor of Computer Science q  At Carnegie Mellon University since 1990 q  Before then in industry (test and measurement)

n  Research interests q  Software architecture tools and techniques q  Self-healing and self-adaptive systems

n  Connection with NASA q  Engagement since 2004 q  Sabbatical at JPL summer of 2006 q  On-going education offerings for several NASA

Centers

Page 3: Software Architecture - NASA

4/14/2012 Garlan 3

This Talk

n  What is Software Architecture? q  Why is it important? q  What are key principles and concepts of software

architecture? q  How can formal “architectural thinking” yield

systems that better satisfy their requirements? n  Prospects for improving Fault Management

through architectural design q  How do these ideas relate to the themes of this

workshop?

Page 4: Software Architecture - NASA

Garlan 4

Examples of Software Architecture Descriptions

4/14/2012

Page 5: Software Architecture - NASA

4/14/2012 Garlan 5

Page 6: Software Architecture - NASA

4/14/2012 Garlan 6

Page 7: Software Architecture - NASA

Software Architecture in Context

Programming- any-which-way

Programming -in-the-small

Programming- in-the-large

Abstract architectures

Software architecture

NATO SE conference

Programming-in-the-large

Software development environments

Subroutines

Separate compilation

Integrated product lines

Information hiding

Inheritance Abstract data types objects

Packages Pipes and filters

Object-oriented Patterns

Model-driven development Component-based Systems

Service-oriented arch

Cloud computing arch

2000

1980

1950

1970

1990

1960

2010

Vanishing system

boundaries Democratization

of Internet

Macros

7 4/14/2012 Garlan

Page 8: Software Architecture - NASA

4/14/2012 Garlan 8

The Promise n  Software Architecture as critical element of

an effective engineering discipline q  from ad hoc definition to codified principles

n  Develop systems “architecturally” q  improve system quality through conceptual

integrity and coherence q  support trade-off analysis & appropriate selection

of architectural approaches q  assure that the system will have desired

properties by design q  manage essential complexity; hide accidental

complexity

Page 9: Software Architecture - NASA

4/14/2012 Garlan 9

The Big Problem

Requirements

Implementations

???

How to bridge the gap between requirements and solutions?

Page 10: Software Architecture - NASA

4/14/2012 Garlan 10

The Role of Software Architecture

Implementations

- High level of system design

- System-level abstractions

- Satisfy high priority requirements

Software Architecture

Requirements

Page 11: Software Architecture - NASA

What is Software Architecture?

11

The software architecture of a computing system is the set of structures needed to reason about the system, which comprise software elements, relations among them

and properties of both.

Documenting Software Architecture: Views and Beyond, 2nd Ed., Clements et al. 2010.

4/14/2012 Garlan

Page 12: Software Architecture - NASA

4/14/2012 Garlan 12

Issues Addressed by Architectural Design n  Structure: decomposition of a system into

interacting components q  assignment of function to components q  selection of component interaction/coordination mechanisms

n  Quality attributes: emergent system properties q  performance, reliability, security, evolvability, testability, cost

of maintenance q  tradeoffs

n  Design principles: conceptual integrity q  vocabulary and rules for system composition q  “load-bearing walls” q  use of codified design idioms, styles, and tactics

Page 13: Software Architecture - NASA

4/14/2012 Garlan 13

Source: “The Google File System” Sanjay Ghemawat, Howard Gobioff, and Shun-Tak Leung"

Example: Google Quality Attributes •  Performance •  Cost •  Availability

Page 14: Software Architecture - NASA

Example: Google

Source: “The Google File System” Sanjay Ghemawat,

Howard Gobioff, and Shun-Tak Leung!

Scalability Cost

Reliability Performance

14

Page 15: Software Architecture - NASA

Principles of Architectural Design

n  Understand architectural drivers q  functional; quality attributes (QA); constraints

n  Identify relevant architectural approaches q  Styles, idioms, patterns, tactics

n  Understand how those approaches impact achievement of quality attributes q  Consider tradeoffs in achieving multiple QAs

n  Select the set of approaches that are optimal for the particular system

4/14/2012 Garlan 15

Page 16: Software Architecture - NASA

16

Example QA: Availability Tactics Availability

Fault Detection

• Ping/Echo • Heartbeat • Exception

Fault Recovery

Preparation and Repair

• Voting • Active Redundancy

• Passive Redundancy

• Spare

Fault Recovery and

Reintroduction

Fault Prevention

• Shadow • State re-synch • Rollback

• Removal from Service

• Transactions • Process Monitor

4/14/2012 Garlan

Page 17: Software Architecture - NASA

This Workshop

n  What architectural approaches are currently used for FM today?

n  What factors influence that decision? n  What are the tradeoffs in picking one FM

architecture over another? n  What can we learn by looking at positive and

negative experiences of prior FM architectures? n  How can we address future challenges in FM

through better understanding of architectural principles?

4/14/2012 Garlan 17

Page 18: Software Architecture - NASA

The End

4/14/2012 Garlan 18

Page 19: Software Architecture - NASA

Supplementary Slides

n  Architecture Drivers n  Quality Attributes n  Styles and Tactics n  Architecture tradeoff analysis

4/14/2012 Garlan 19

Page 20: Software Architecture - NASA

20

Architectural Drivers – 1

n  Architectural drivers are requirements that shape the software architecture

Functional Requirements Quality Attributes

Constraints

Software Architecture

4/14/2012 Garlan

Page 21: Software Architecture - NASA

21

Architectural Drivers – 2

n  Functional Requirements – what the system must do. q  In architectural design we are concerned with high

level function not implementation details. n  Constraints – design decisions already made

for the designers. q  Business/organizational (e.g., schedule) q  Technical (e.g., required use of legacy platform)

n  Quality Attributes – characteristics the system must possess in addition to the functionality.

4/14/2012 Garlan

Page 22: Software Architecture - NASA

22

Quality Attributes

n  Example QAs q  availability q  modifiability q  performance q  security

n  Important notes q  There is no standard taxonomy/definitions of QA q  Each QA has multiple aspects q  System-level QA requirements may induce

functional requirements on a subsystem 4/14/2012 Garlan

Page 23: Software Architecture - NASA

23

Example: Availability – 1

n  Definition: Availability is concerned with system failure and its associated consequences. A system failure occurs when a system no longer delivers a service that is consistent with its specification.

4/14/2012 Garlan

Page 24: Software Architecture - NASA

24

Example: Availability – 2

n  Areas of concern include q  preventing catastrophic system failures q  detecting system failures q  recovering successfully from system failures q  the amount of time needed to recover from system

failures q  the frequency of system failures q  degraded modes of operation due to system

failures

4/14/2012 Garlan

Page 25: Software Architecture - NASA

Styles and Tactics

n  Architectural design can be improved by reusing prior architectural approaches that have well-understood properties

n  Two of the most common forms of reuse are q  Styles: general families of systems based on

overall compositional structure q  Tactics: techniques for improving quality attributes

4/14/2012 Garlan 25

Page 26: Software Architecture - NASA

A (Partial) Catalogue of Styles

n  Data flow q  batch sequential q  pipes and filters q  process control

n  Call-return q  main program-subroutine q  object-oriented q  component-based q  peer-to-peer q  service-oriented q  N-tiered

n  Event-based q  asynchronous messaging q  publish-subscribe q  implicit invocation q  data-triggered

n  Data-centered q  repository q  blackboard q  shared variable

4/14/2012 26 Garlan

Page 27: Software Architecture - NASA

27

Tactics

n  A tactic is a design decision that refines a high level style and is influential in the control of a quality attribute response.

promotes quality attribute tactic design decision

4/14/2012 Garlan

Page 28: Software Architecture - NASA

28

Example QA: Availability Tactics Availability

Fault Detection

• Ping/Echo • Heartbeat • Exception

Fault Recovery

Preparation and Repair

• Voting • Active Redundancy

• Passive Redundancy

• Spare

Fault Recovery and

Reintroduction

Fault Prevention

• Shadow • State re-synch • Rollback

• Removal from Service

• Transactions • Process Monitor

4/14/2012 Garlan

Page 29: Software Architecture - NASA

Garlan 29

Availability Tactics – 2 Fault Fault masked

n  Fault detection q  ping/echo: when one component issues a ping

and expects to receive an echo within a predefined time from another component

q  heartbeat: when one component issues a message periodically while another listens for it

q  exceptions: using exception mechanisms to raise faults when an error occurs

4/14/2012

Page 30: Software Architecture - NASA

Architecture Tradeoff Analysis

n  A tactic is usually selected because it will improve a particular QA

n  But at the same time it will have an impact on other QA or other aspects of the same QA

n  Example: Detection Tactics for Availability q  Performance: number of messages, timeliness of

detection q  Testability: complexity, non-determinism q  Modifiability: distributed/localized responsibility

4/14/2012 Garlan 30