20.08.2013 Views

slides - trese

slides - trese

slides - trese

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ArchiRationale: Feature-Based Rationale<br />

Management System for Supporting Software<br />

Architecture Adaptation<br />

University of Twente<br />

Software Engineering Group<br />

29 January 2009<br />

Bedir Tekinerdoğan, Hasan Sözer, Mehmet Aksit<br />

Bilkent University<br />

Department of Computer Engineering<br />

06800 Bilkent Ankara<br />

http://www.cs.bilkent.edu.tr/~bedir<br />

bedir@cs.bilkent.edu.tr


Rationale for Software Architecture<br />

Improved understanding because of a higher level<br />

abstract specification<br />

Guides subsequent phases since it embodies earliest<br />

design decisions<br />

Supports stakeholder communication<br />

Support for large-grained reuse<br />

Enables to evaluate system before it is implemented<br />

Management of software development activities<br />

© Bedir Tekinerdoğan 2


Architectural Viewpoints<br />

Viewpoint:<br />

A pattern or template from which to construct<br />

individual views.<br />

View<br />

a model of the system from the perspective<br />

of one or more concerns which are held by<br />

one or more stakeholders<br />

has<br />

Concern<br />

1..*<br />

Stakeholder<br />

important to 1..*<br />

1..*<br />

used to cover<br />

identifies<br />

described by<br />

Architecture<br />

Architectural<br />

Description<br />

© Bedir Tekinerdoğan 3<br />

1..*<br />

1..*<br />

is addressed to<br />

Viewpoint<br />

conforms to<br />

1 1<br />

organized by<br />

View<br />

1..*<br />

participates in<br />

consists of 1..*<br />

Model


Organizing Views (Views and Beyond)<br />

An architect must consider the system in three ways:<br />

How is it structured as a set of implementation units?<br />

Module Views (Module viewtype)<br />

How is it structured as a set of elements that have run-time<br />

behavior and interactions?<br />

Component-and-connector views (C&C viewtype)<br />

How does it relate to non-software structures in its environment?<br />

Allocation views (allocation viewtype)<br />

© Bedir Tekinerdoğan 4


Architectural Documentation<br />

Views give us our first principle of architecture<br />

documentation:<br />

Document the relevant views,<br />

and then add information<br />

that applies to more than one view.<br />

Software Architecture<br />

Documentation<br />

View<br />

Transview<br />

Information<br />

© Bedir Tekinerdoğan 5


Software Architecture Patterns<br />

express a fundamental structural organization<br />

schemes for software systems.<br />

provide a set of predefined subsystems<br />

specify their responsibilities<br />

and include rules and guidelines for organizing the<br />

relationships between them<br />

© Bedir Tekinerdoğan 6


Architecture Evaluation Techniques<br />

Analytic Models<br />

Simulations<br />

Question-based<br />

Questionnaire-based<br />

List of general open questions that apply to all software<br />

architectures.<br />

Checklist-based<br />

detailed set of questions<br />

after experience of analyzing common set of systems<br />

usually domain specific<br />

Scenario-based analysis<br />

© Bedir Tekinerdoğan 7


The software architect<br />

software architect is currently equipped with a broad set of techniques to<br />

design a software architecture:<br />

Architectural Modeling (Views, ADLs)<br />

Architectural Patterns<br />

Architectural Evaluation Techniques<br />

Architectural Methods<br />

...<br />

Using these approaches the software architect makes a wide range of design<br />

decisions that leads to the selection of a particular design alternative.<br />

“I am the Architect. I created The Matrix. …"<br />

© Bedir Tekinerdoğan 8


Design Rationale<br />

The reasons behind the<br />

design decisions, the<br />

justification, the alternatives<br />

considered, the trade-offs<br />

evaluated, and the<br />

argumentation that led to the<br />

decision is defined as design<br />

rationale<br />

Software<br />

Architecture<br />

Architectural<br />

Components, Relations,<br />

Styles, Patterns,<br />

ADL<br />

Rationale<br />

© Bedir Tekinerdoğan 9


Design Rationale Management<br />

The explicit capturing, documentation and usage of the design rationale<br />

important for many different reasons such as design communication,<br />

design evolution, design maintenance, design verification, and design<br />

reuse<br />

In general practitioners recognize the importance of documenting and<br />

usage of design rationale to support the reasoning about design choices.<br />

Unfortunately architecture design rationale is still not being documented<br />

in a consistent manner<br />

methodology and tool support for design rationale capture and usage is<br />

necessary<br />

© Bedir Tekinerdoğan 10


Design Rationale Management System<br />

Rationale management systems enable the capturing,<br />

modelling and accessing of design rationale.<br />

Classification<br />

process-oriented rationale management system<br />

feature-oriented rationale management system<br />

© Bedir Tekinerdoğan 11


Process-Oriented Rationale Management Approaches<br />

Often applied for dynamic design domains in which the design<br />

principles are not well-established.<br />

there is no well-defined set of features or options. different new<br />

questions, arguments can be raised during the development process<br />

considers the design rationale usually as a history of the design<br />

process<br />

The representation of design rationale in this approach is usually<br />

graph-based in which the nodes represent questions, positions and<br />

arguments and the links the relations among these concepts.<br />

Examples: Ibis, QOC , DRL, PHI etc.<br />

© Bedir Tekinerdoğan 12


Feature-based Rationale Management Approaches<br />

evolved from the process-based rationale approaches<br />

but differ in the rationale capturing approach.<br />

In a feature-based rationale approach the design<br />

rationale is based on features of a system rather than<br />

the arguments raised during the development process.<br />

Feature-based rationale approaches are typically used<br />

for well-defined domains with established design<br />

rules.<br />

© Bedir Tekinerdoğan 13


Example Feature Diagram for Insurance Systems<br />

Corporation<br />

Realty<br />

Insurance Product<br />

Insured Object Coverage Payment<br />

Conditions Premium<br />

Movable<br />

Property<br />

Person<br />

Illness<br />

Life<br />

Unemployment<br />

Damage<br />

Loss<br />

Service<br />

© Bedir Tekinerdoğan 14<br />

Amount<br />

Legend:<br />

Own Risk<br />

Acceptance Exception<br />

mandatory feature<br />

optional feature<br />

Direct Periodical<br />

alternative feature<br />

or-feature<br />

Payee<br />

Person Corporation


Design Rationale - Focus<br />

In general the overall design rationale and its context<br />

becomes very large,<br />

and likewise it is impossible to capture and represent<br />

an entire design rationale explicitly<br />

Even if this would be possible, it is also not always<br />

necessary or desired to represent the complete design<br />

rationale.<br />

© Bedir Tekinerdoğan 15


The focus of this talk<br />

We expect that a software architecture is provided<br />

that needs to be adapted for particular quality concerns.<br />

The design rationale capturing process starts after<br />

the architecture design and<br />

considers then the design decisions, the alternatives and<br />

the argumentation behind the adaptation of the<br />

architecture<br />

As such we do not consider capturing design rationale<br />

from the initial requirements document to the<br />

architecture design<br />

© Bedir Tekinerdoğan 16


Context - Trader Project<br />

Industry-as-laboratory project<br />

Television Related Architecture Design to<br />

Enhance Reliability (Trader)<br />

Context: Embedded Systems and in particular<br />

consumer electronics (Digital TV)<br />

Period: Sept.2004-Aug. 2009<br />

10 partners (industrial and academic)<br />

22 fte/yr, 7 PhDs, 2 Postdocs,<br />

around 3-4 miljon euro<br />

funded by The Netherlands Ministry of<br />

Economical Affairs under the Bsik programme<br />

ESI, Eindhoven:<br />

project location<br />

Carrying Industrial Partner<br />

© Bedir Tekinerdoğan 17


Reliability<br />

The probability that a system will continue to function without failure<br />

for a specified period in a specified environment.<br />

How to prevent failures?<br />

fault prevention<br />

fault removal<br />

fault tolerance<br />

delivered service<br />

deviates from<br />

the correct service<br />

system state that<br />

may cause a failure<br />

the cause of<br />

an error<br />

ANSI/IEEE, "Standard Glossary of Software Engineering Terminology,” STD-729-1991, ANSI /IEEE, 1991.<br />

Failure<br />

Error<br />

Fault<br />

propagation<br />

activation<br />

© Bedir Tekinerdoğan 18


Fault-Tolerant Design<br />

designing a system so it will continue to operate,<br />

possibly at a reduced level,<br />

rather than failing completely, when some part of the<br />

system has an error.<br />

Fault Tolerance:<br />

Error detection<br />

Diagnosis<br />

Recovery<br />

© Bedir Tekinerdoğan 19


Example - Mediaplayer<br />

Stream reads the input media by<br />

bytes/blocks and provides buffering, seek<br />

and skip functions.<br />

Demuxer demultiplexes (separates) the<br />

input to audio and video channels, and<br />

reads them from buffered packages.<br />

Mplayer connects the other modules, and<br />

maintains the synchronization of audio and<br />

video.<br />

Libmpcodecs embodies the set of available<br />

codecs.<br />

Libvo displays video frames.<br />

Libao controls the playing of audio.<br />

Gui provides the graphical user interface of<br />

MPlayer.<br />

enhance the architecture for fault tolerance<br />

© Bedir Tekinerdoğan 20


Adapting Architecture<br />

Architectural<br />

Components, Relations,<br />

Styles, Patterns,<br />

ADL<br />

Adapt....<br />

each fault-tolerant architecture<br />

will be the result of a set of<br />

design decisions<br />

and there is a rationale behind<br />

these decisions (e.g. to reduce<br />

cost, to achieve high<br />

availability/performance).<br />

© Bedir Tekinerdoğan 21


Alternative Recovery Designs<br />

?<br />

© Bedir Tekinerdoğan 22


Analysis vs. Design Rationale<br />

How to select and analyze a<br />

particular design alternative<br />

(alternative space analysis)<br />

What decisions are taken during<br />

the selection of the design<br />

alternative?<br />

(design rationale management)<br />

© Bedir Tekinerdoğan 23


Design Rationale Metamodel<br />

Feature Modelling defines the<br />

metamodel for defining feature models<br />

Feature Decisions part includes the<br />

concepts for selecting features and<br />

capturing the rationale behind these<br />

features<br />

Design Alternatives part represents<br />

the approaches for realizing the<br />

selected feature decisions in the<br />

Feature Decision Rationale<br />

Architecture Design part of the<br />

metamodel includes the concept for<br />

modelling architectures.<br />

Feature Modeling<br />

Family Feature Model<br />

-name<br />

-constraints<br />

Architecture Design Design Alternatives<br />

© Bedir Tekinerdoğan 24<br />

Architecture<br />

described<br />

by<br />

1..*<br />

1..*<br />

-name<br />

Feature<br />

-name<br />

-cardinality<br />

0..*<br />

FeatureGroup<br />

Architectural Description<br />

selects<br />

applied to<br />

Feature Decision<br />

-id<br />

-name<br />

-type<br />

-state<br />

-category<br />

Application Feature Model<br />

-id<br />

-name<br />

-state<br />

-id<br />

-name<br />

-type<br />

-state<br />

-id<br />

-name<br />

Design Template<br />

0..*<br />

Design Alternative<br />

provides solution<br />

to<br />

-argument<br />

-assumption<br />

Feature Decisions<br />

Feature Decision Rationale<br />

Feature Decision Criteria<br />

-description<br />

Design Template Criteria<br />

-description<br />

Design Alternative Rationale<br />

-argument<br />

-assumption<br />

using


ArchiRationale: Integrated Tool<br />

Feature-based rationale<br />

management tool<br />

built in the Eclipse Platform<br />

To implement the rationale<br />

management approach<br />

customizes and integrates several<br />

open-source tools that are<br />

provided as Eclipse plug-ins<br />

and all based on the XML<br />

technology.<br />

The activities of the approach Tool support<br />

Architecture Design ArchStudio<br />

Modeling Architectural Tactic Space<br />

of Quality<br />

XFeature<br />

Capturing Design Rationale XFeature,<br />

Recovery Designer<br />

Design Alternative Application ArchStudio<br />

Accessing Design Rationale XQuery<br />

Outline View<br />

(Fault Tolerance<br />

Family Model)<br />

Editing Pane<br />

(Fault Tolerance<br />

Family Model)<br />

Navigator (Xfeature Models)<br />

XQuery<br />

perspective<br />

Arch-Studio<br />

perspective<br />

Properties Pane<br />

© Bedir Tekinerdoğan 25


The Approach<br />

Modeling/Preparation<br />

Architecture Design<br />

Modeling Architectural tactic space (family<br />

feature model)<br />

Capturing Design Rationale<br />

Instantiate familiy feature model (selected<br />

features) representing fault tolerant view<br />

For each feature selection define the<br />

rationale<br />

Set of feature selections define fault<br />

tolerance view<br />

Fault tolerance view is related to<br />

corresponding alternative design template Design<br />

© Bedir Tekinerdoğan 26<br />

Architecture<br />

Design<br />

Modeling<br />

Architectural Tactic<br />

Space of Quality<br />

Capturing Design Rationale<br />

Alternative<br />

Application<br />

KEY<br />

Software<br />

Architecture<br />

Design<br />

Domain Analysis<br />

Feature Decision<br />

Design Template<br />

Definition<br />

Design Alternative<br />

Selection<br />

Fault Tolerant<br />

Architecture +<br />

Rationale<br />

Family Feature<br />

Model<br />

Application<br />

Feature Model<br />

Design Template<br />

Design<br />

Alternatives<br />

Process Artefact Data<br />

Flow<br />

Conceptual<br />

Architecture<br />

Select and Apply<br />

Design Alternative


Modeling Architecture - ArchStudio<br />

ArchStudio<br />

open-source software and systems<br />

architecture development environment<br />

uses an XML-based architecture<br />

description language, xADL<br />

integrates several tools for modeling,<br />

visualizing, analyzing and<br />

implementing architectures that are<br />

expressed in xADL.<br />

we model the existing architecture<br />

design and design alternatives with the<br />

Archipelago tool of ArchStudio.<br />

Archipelago is a front-end tool that<br />

provides a graphical user interface to<br />

create, view and modify an<br />

architecture description specified in<br />

xADL.<br />

© Bedir Tekinerdoğan 27


Defining Feature Models<br />

XFeature:<br />

XFeature is a feature modeling tool which supports the<br />

modeling of product families and of the applications<br />

instantiated from them.<br />

It employs an XML-based approach to express the feature<br />

models and it uses XML schemas to express the metamodels.<br />

It is possible to customize the XFeature tool with respect to<br />

the type of feature diagrams that can be specified and the<br />

graphical notations that are used for representing feature<br />

models.<br />

We have customized the XFeature tool for ArchiRationale<br />

by specifying the meta-model of design rationale<br />

© Bedir Tekinerdoğan 28


Family Feature Model<br />

Architectural tactic is defined as<br />

characterization of architectural<br />

decisions that are needed to<br />

achieve a desired quality<br />

attribute response (e.g. Fault<br />

tolerance)<br />

Architectural tactics are derived<br />

using a domain analysis process<br />

and represented in a family<br />

feature model.<br />

Unlike existing feature-based<br />

rationale management<br />

approaches we focus on modeling<br />

quality features instead of product<br />

features<br />

© Bedir Tekinerdoğan 29<br />

transient<br />

KEY<br />

persistence<br />

recovery<br />

error type granularity technique<br />

permanent<br />

stable<br />

storage<br />

total<br />

compensation<br />

check-pointing<br />

uncoordinated coordinated communication<br />

induced<br />

feature<br />

global<br />

non-blocking<br />

local<br />

blocking<br />

backward<br />

recovery<br />

log-based<br />

forward<br />

recovery<br />

replication graceful<br />

degradation<br />

optional<br />

sub-feature<br />

pessimistic optimistic causal<br />

mandatory<br />

sub-feature<br />

alternative<br />

sub-features


XML-Based Customized Feature Modeling with XFeature<br />

Use meta-metamodel of X-<br />

Feature to define design rationale<br />

metamodel<br />

Based on design rationale metamodel<br />

define a Architectural Tactic<br />

Space (Family Model)<br />

Family Model is input to XSL<br />

program that generates a metamodel<br />

based on a provided family<br />

model. (e.g. Fault Tolerance<br />

Family Feature model).<br />

Fault tolerance views are defined<br />

based on Architectural Tactic<br />

Space Meta model.<br />

Feature<br />

Meta-Meta-Model<br />

(XML Schema)<br />

Design Rationale<br />

Meta-Model<br />

(XML Schema)<br />

Fault Tolerance View<br />

(Feature<br />

Fault<br />

Fault Diagram<br />

Tolerance View<br />

(Feature Diagram<br />

Tolerance - XML)<br />

- XML)<br />

View<br />

(Feature Diagram - XML)<br />

© Bedir Tekinerdoğan 30<br />

extends<br />

conforms-to<br />

input-to<br />

Fault Tolerance<br />

Architectural Tactic Space<br />

(Family Model - XML)<br />

Design Rationale<br />

Meta-Model Generator<br />

(XSD Generator- XSL Program)<br />

generates<br />

Fault Tolerance<br />

Architectural Tactic Space<br />

Meta Model<br />

(XML Schema)<br />

conforms-to


Modeling Family and Application Feature Model<br />

Fault Tolerance Family<br />

Model, which defines the<br />

technical space of fault<br />

tolerance.<br />

Several application fault<br />

tolerance models by selecting<br />

features from the family feature<br />

model<br />

Family Feature Model<br />

Application Feature Model<br />

© Bedir Tekinerdoğan 31


Fault Tolerance View<br />

Every feature diagram that is specified<br />

with respect to the Fault Tolerance<br />

architectural tactic space is a Fault<br />

Tolerance View<br />

A fault tolerance view captures and<br />

stores the design rationale related<br />

to selections and choices made<br />

with respect to the fault tolerance<br />

architectural tactic space<br />

A fault tolerance view relates to<br />

design template (modeled with the<br />

tools of ArchStudio, and stored as<br />

separate XML file).<br />

Design Template that corresponds to a Fault<br />

Tolerance Feature Model defined using ArchStudio<br />

© Bedir Tekinerdoğan 32


Two different layers of decisions<br />

decide on the features for<br />

recovery that need to be<br />

realized by the enhanced<br />

architecture.<br />

Decide on the decompostition<br />

of the architecture based on<br />

design template<br />

Example<br />

Select local recovery<br />

Decide which components need<br />

to be made recoverable<br />

© Bedir Tekinerdoğan 33<br />

transient<br />

KEY<br />

persistence<br />

recovery<br />

error type granularity technique<br />

stable<br />

storage<br />

total<br />

compensation<br />

check-pointing<br />

uncoordinated coordinated communication<br />

induced<br />

feature<br />

permanent<br />

global<br />

non-blocking<br />

local<br />

blocking<br />

backward<br />

recovery<br />

log-based<br />

forward<br />

recovery<br />

replication graceful<br />

degradation<br />

optional<br />

sub-feature<br />

pessimistic optimistic causal<br />

mandatory<br />

sub-feature<br />

alternative<br />

sub-features


Alternative Recovery Designs<br />

transient<br />

KEY<br />

persistence<br />

recovery<br />

error type granularity technique<br />

stable<br />

storage<br />

total<br />

compensation<br />

check-pointing<br />

uncoordinated coordinated communication<br />

induced<br />

feature<br />

permanent<br />

global<br />

non-blocking<br />

local<br />

blocking<br />

backward<br />

recovery<br />

log-based<br />

forward<br />

recovery<br />

replication graceful<br />

degradation<br />

optional<br />

sub-feature<br />

pessimistic optimistic causal<br />

mandatory<br />

sub-feature<br />

alternative<br />

sub-features<br />

© Bedir Tekinerdoğan 34


Adapting Architecture<br />

After a design template is selected, the<br />

next step is to adapt the architecture<br />

accordingly.<br />

Several additional design alternatives<br />

can exist for adapting the architecture.<br />

These alternatives are specific to the<br />

selected design template.<br />

It requires the evaluation of several<br />

criteria and dedicated analysis<br />

techniques.<br />

The design rationale at this step is<br />

basically formed by the criteria set<br />

being evaluated, the evaluation<br />

method (e.g. based on simulation or<br />

analytic models), types of formal<br />

models employed, their parameters,<br />

assumptions and the analysis results.<br />

We use RecoveryDesigner tool<br />

© Bedir Tekinerdoğan 35


Querying Design Rationale<br />

XQuery is a language to query XML data<br />

sources.<br />

XQuery Development Tools provides<br />

support of XQuery inside the Eclipse<br />

platform including code templates, semantic<br />

analysis, query validation and execution.<br />

Using the XQuery Development Tools, we<br />

have created and validated parameterized<br />

query functions that are defined to query<br />

XML data conforming to the ArchiRationale<br />

XML schemas created with the XFeature<br />

Tool.<br />

Quality Feature<br />

Model<br />

Design Rationale Database<br />

Design<br />

Alternatives<br />

Fault Tolerant<br />

Architecture +<br />

Rationale<br />

© Bedir Tekinerdoğan 36<br />

Queries<br />

User


Design Rationale Repository<br />

Artifacts delivered through the<br />

rationale process are stored in a<br />

repository and the necessary<br />

information can be queried. Design Rationale Database<br />

Function Description<br />

getDesignDecisions() Retrieve all the design<br />

decisions and their properties<br />

getDesignOptions() Retrieve all the design options<br />

and their properties<br />

getDecisionProperties(p) Retrieve a particular property<br />

regarding the design decisions<br />

getOptionProperties(p) Retrieve a particular property<br />

regarding the design options<br />

queryDecisionProperties(p,q) Retrieve the design decisions<br />

that contain the query text in<br />

the specified property<br />

queryOptionProperties(p,q) Retrieve the design options<br />

that contain the query text in<br />

the specified property<br />

Quality Feature<br />

Model<br />

Design<br />

Alternatives<br />

Fault Tolerant<br />

Architecture +<br />

Rationale<br />

© Bedir Tekinerdoğan 37<br />

Queries<br />

User


Characterization of ArchiRationale<br />

Focus on adaptation of<br />

architecture<br />

Defining rationale based<br />

on quality concern<br />

Focus on well-defined<br />

domain<br />

Goal Support for Design Adaptation<br />

System Type Feature-Based; Features are techniques to<br />

realize quality<br />

Services Design Documentation, Constraint<br />

Checking, Design Adaptation<br />

Represented<br />

Information<br />

Representation<br />

Method<br />

Feature Decisions, Design Options,<br />

Design Alternatives (three layers)<br />

Formal (features) and<br />

semi-formal (decisions)<br />

Capture Method Methodological by-product after the<br />

initial architecture has been designed<br />

Access Method User-Initiated<br />

Domain Techniques to implement Quality<br />

Concerns (Architectural Tactic Space)<br />

Design Type Adaptation<br />

Design Phase Post-Architecture Design,<br />

Architectural Maintenance<br />

Number of<br />

Designers<br />

© Bedir Tekinerdoğan 38<br />

Any<br />

Notation Feature Modeling; Architecture<br />

description, XML-based


Conclusion<br />

a meta-model that defines the concepts and the<br />

relations among the architecture and the rationale<br />

management system.<br />

a systematic rationale management approach for<br />

documenting and accessing the rationale for architecture<br />

design alternatives.<br />

Because the rationale system is focusing after the<br />

architecture design process, the approach is<br />

complementary and agnostic to the applied<br />

architecture design method.<br />

an integrated tool environment ArchiRationale that<br />

supports the capturing and access of design rationale<br />

and the related artefacts<br />

© Bedir Tekinerdoğan 39

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!