Role of architect and Quality attributes School of Computer Science - - PowerPoint PPT Presentation

role of architect and
SMART_READER_LITE
LIVE PREVIEW

Role of architect and Quality attributes School of Computer Science - - PowerPoint PPT Presentation

Software Architecture University of Oviedo Role of architect and Quality attributes School of Computer Science Jose E. Labra Gayo Course 2018/2019 Software Architecture Contents University of Oviedo Role of architect Quality attributes


slide-1
SLIDE 1

Software Architecture

School of Computer Science University of Oviedo

Role of architect and Quality attributes

Jose E. Labra Gayo Course 2018/2019

slide-2
SLIDE 2

Software Architecture

School of Computer Science University of Oviedo

Contents

Role of architect Quality attributes

Quality attribute scenarios Design concepts:

Reference architectures, patterns, styles & tactics

ADD: attribute-driven design

Architectural issues

Architecture evaluation (ATAM)

slide-3
SLIDE 3

Software Architecture

School of Computer Science University of Oviedo

slide-4
SLIDE 4

Software Architecture

School of Computer Science University of Oviedo

Role of the architect

Expectations of an architect

Make architectural decisions Continually analyse the architecture Keep current with existing trends Ensure compliance with existing decisions Diverse exposure and experience Have business domain knowledge Possess interpersonal skills Understand and navigate politics

Laws of software architecture

slide-5
SLIDE 5

Software Architecture

School of Computer Science University of Oviedo

Make architectural decisions

Define architecture decisions and design principles Architect should guide technology decisions Keep decision records Analyse pros and cons

slide-6
SLIDE 6

Software Architecture

School of Computer Science University of Oviedo

Continually analyse the architecture

Continually analyse the architecture and technology Being responsible for technical success of project Be aware of structural decay Strive for consistency

Organize the code into packages, folders, modules, ... Define boundaries, guidelines, principles,... Include testing and release environments into projects

slide-7
SLIDE 7

Software Architecture

School of Computer Science University of Oviedo

Ensure compliance with existing decisions

Architects usually impose some constraints Example:

Database access from User Interface constraint Developers could bypass it

User interface Business logic Database direct call X

slide-8
SLIDE 8

Software Architecture

School of Computer Science University of Oviedo

Keep current with existing trends

Be aware of latest technology and industry trends

Decisions made by architect = long lasting and costly Good architects know what they know and what they don't know

Things we know Things we know we don't know Things we don't know we don't know Danger!

slide-9
SLIDE 9

Software Architecture

School of Computer Science University of Oviedo

Diverse exposure and experience

Have exposure to multiple and diverse technologies, frameworks, platforms, environments,... It doesn't mean being an expert in each of them ...but at least be familiar with varying technologies Technical breadth better than technical depth

slide-10
SLIDE 10

Software Architecture

School of Computer Science University of Oviedo

Business domain knowledge

Architect expected to have certain level of business domain knowledge Understand business problem, goals and requirements Effectively communicate with executives and business users using the domain language

slide-11
SLIDE 11

Software Architecture

School of Computer Science University of Oviedo

Possess interpersonal skills

Software architect = leader Teamwork and leadership skills Technical leadership

Be inclusive and collaborate

Help developers understand the big picture

Get hands-on

Be engaged in the delivery Low-level understanding Coding as part of the role Code reviews and mentorship

"no matter what they tell you, it's always a people problem", G. Weinberg

slide-12
SLIDE 12

Software Architecture

School of Computer Science University of Oviedo

Understand and navigate politics

Understand the political climate of the enterprise and be able to navigate the politics

Architectural decisions affect stakeholders

Product owners, project managers, business stakeholders, developers...

Almost every decision an architect makes will be challenged

Negotiation skills are required

Present and defend the architecture

slide-13
SLIDE 13

Software Architecture

School of Computer Science University of Oviedo

Laws of Software architecture

Everything in software architecture is a tradeoff. —1st Law of Software Architecture

If an architect thinks they have discovered something that isn’t a tradeoff, more likely they just haven’t identified the tradeoff yet. —Corollary 1

slide-14
SLIDE 14

Software Architecture

School of Computer Science University of Oviedo

Architecture characteristics

slide-15
SLIDE 15

Software Architecture

School of Computer Science University of Oviedo

Types of requirements

Requirements can be categorized as: Functional requirements: state what the system must do, how it must behave or react to run-time stimuli. Quality attribute requirements. Annotate (qualify) functional requirements

Examples: Availability, modifiability, usability, security,...

Also called: non-functional requirements

  • Constraints. A design decision that has already been made
slide-16
SLIDE 16

Software Architecture

School of Computer Science University of Oviedo

Functional requirements

Functionality = ability of the system to do the work for which it was intended Functionality has a strange relationship to architecture: It does not determine architecture;

If functionality were the only requirement, the system could exist as a single monolithic module with no internal structure at all

Functionality and quality attributes are orthogonal

Functionality Quality

slide-17
SLIDE 17

Software Architecture

School of Computer Science University of Oviedo

Quality attributes (QA)

Quality attributes annotate (qualify) the functionality

If a functional requirement is "when the user presses the green buttom an options dialog appears"

  • A performance QA could describe how quickly
  • An availability QA could describe this option could fail, or

how often it will be repaired

  • A usability QA could describe how easy is to learn this

function

Quality attributes influence the architecture

slide-18
SLIDE 18

Software Architecture

School of Computer Science University of Oviedo

What is Quality?

Degree to which a system satisfies the stated and implied needs of its stakeholders, providing value

  • Degree (not Boolean)
  • Quality = Fitness for purpose (stakeholders needs)
  • Conform to requirements (stated and implied)
  • Providing value

Several definitions of quality

https://en.wikipedia.org/wiki/Software_quality

slide-19
SLIDE 19

Software Architecture

School of Computer Science University of Oviedo

Quality attributes and trade-offs

QAs are all good ...but value depends on the project & stakeholder

"Best quality"...for what?, for whom?

QAs are not independent

Some qualities can conflict What matters most?

Example: A very secure system can be less usable

There is always a price

What is your budget?

There is no single perfect system or architecture!

slide-20
SLIDE 20

Software Architecture

School of Computer Science University of Oviedo

Specifying quality attributes

2 considerations:

QAs by themselves are not enough

They are non-operational

Example: It is meaningless to say that a system shall be modifiable or maintainable

The vocabulary describing QAs varies widely

It is necessary to describe each attribute separately

QA scenarios: A common form to specify QA requirements

slide-21
SLIDE 21

Software Architecture

School of Computer Science University of Oviedo

Quality attribute scenario

Describe a stimulus of the system and a measurable response to the stimulus

Stimulus = event triggered by a person or system The stimulus generates a response

Must be testable

Response must be externally visible and measurable

Artifact Response measure Stimulus Response Source Environment

slide-22
SLIDE 22

Software Architecture

School of Computer Science University of Oviedo

Components of QA scenario

Source: Person or system that initiates the stimulus Stimulus: Events that requires the system to respond Artifact: Part of the system or the whole system Response: Externally visible action Response measure: Success criteria for the scenario Should be specific and measurable Environment: Operational circumstances Should be always defined (even if it is "normal")

Artifact Response measure Stimulus Response Source Environment

slide-23
SLIDE 23

Software Architecture

School of Computer Science University of Oviedo

QA scenario, example 1

Artifact

User interface

Response Measure

< 1sec

Stimulus

20 concurrent clients

Response

Response time

Source

Clients

Environment

Normal operation Source of stimulus Stimulus Artifact Environment Response Response measure Clients 20 concurrent clients User interface Normal

  • peration

Response time <1sec . . . . . . . . . . . . . . . . . .

Performance: If there are 20 concurrent clients, the response time should be less than 1 sec. under normal operation

slide-24
SLIDE 24

Software Architecture

School of Computer Science University of Oviedo

QA Scenario structure for availability

Artifact

Processors Communication channels Persistent storage Processes

Response Measure

Time or time interval system must be available Time in degraded mode Time to dtect fault Repair time Proportion of faults system handles

Stimulus

Fault Omission Crash Incorrect timing Incorrect response

Response

Prevent fault from becoming failure Detect fault Recover from fault Log fault Disable event source Be unavailable Degraded mode

Source

Internal/external people hardware, software physical infrastructure physical environment

Environment

Normal operation Startup Shutdown Repair mode Degraded operation Overloaded operation

slide-25
SLIDE 25

Software Architecture

School of Computer Science University of Oviedo

Types of QA scenarios

Usage scenarios

The system is used (any use case or system function is executed)

Describe how the system behaves in these cases

Runtime, performance, memory consumption, throughput,...

Change (or modification) scenarios

Any component within the system, its environment or its

  • perational infrastructure changes

Failure scenarios:

Some part of the system, infrastructure or neighbours fail

slide-26
SLIDE 26

Software Architecture

School of Computer Science University of Oviedo

Prioritizing QA scenarios

Scenarios should be prioritized

2 values (Low/Medium/High)

How important it is for success (ranked by customer) How difficult it is to achieve (ranked by architect)

Ref Quality Attribute Scenario Priority 1 Availability When the database does not respond, the system should log the fault and respond with stale data during 3 seconds High, High 2 Availability A user searches for elements of type X and receives a list of Xs 99%

  • f the time on average over the course of the year

High, Medium 3 Scalability New servers can be added during the planned maintainance window (less than 7 hours) Low, Low 4 Performance A user sees search results within 5 seconds when the system is at an average load of 2 searches per second High, High 5 Reliability Updates to external elements of type X should be reflected on the application within 24 hours of the change Low, Medium . . . . . . . . .

slide-27
SLIDE 27

Software Architecture

School of Computer Science University of Oviedo

Identifying quality attributes

Finding QAs

Most of the time, QAs are not explicit

They're only verbally said alongside func. requirements Usually implicit or said without much thought

Software architect must do educated guesses

Quality Attribute Workshops

Meetings where stakeholders specify QAs

Formal checklists

ISO25010 Wikipedia:

https://en.wikipedia.org/wiki/List_of_system_quality_attributes

slide-28
SLIDE 28

Software Architecture

School of Computer Science University of Oviedo

Typical quality attributes

Availability Modifiability Performance Security Testability Maintainability Usability Scalability Interoperability Portability Changeability . . .

slide-29
SLIDE 29

Software Architecture

School of Computer Science University of Oviedo

ISO-25010 Software Quality Model

Systems and software Quality Requirements and Evaluation (SQuaRE) 2 parts:

  • Quality in-use
  • Product quality

https://arquisoft.github.io/Iso25010QualityAttributes.html

slide-30
SLIDE 30

Software Architecture

School of Computer Science University of Oviedo

Quality Attribute tree

Mindmap representations can be useful to visualize QA scenarios

slide-31
SLIDE 31

Software Architecture

School of Computer Science University of Oviedo

Tactics, styles, patterns, reference architectures

slide-32
SLIDE 32

Software Architecture

School of Computer Science University of Oviedo

Tactics

Design techniques to achieve a response to some quality attributes Tactics focus on a single quality attribute response

They may compromise other quality attributes

Tactics are intended to control responses to stimuli

Tactics to control response Stimulus Response

slide-33
SLIDE 33

Software Architecture

School of Computer Science University of Oviedo

Tactics depend on QA

Availability

Fault Fault masked or repair made

Modifiability

Changes arrive Changes made, tested and deployed within time and budget

Performance

Events arrive Response generated within time constraints

Security

Attack System detects, resists, or recovers from attack

Testability

Faults detected Completion of an increment

Usability

User given appropriate feedback and assistance User request

slide-34
SLIDE 34

Software Architecture

School of Computer Science University of Oviedo

Where can we find tactics?

Architect's own experience Documented experience from community

Books, conferences, blogs,...

Tactics evolve with time and trends

Book "Software architecture in practice" contains a list of tactics for some quality attributes

http://www.ece.ubc.ca/~matei/EECE417/BASS/ch05lev1sec1.html https://www.cs.unb.ca/~wdu/cs6075w10/sa2.htm

slide-35
SLIDE 35

Software Architecture

School of Computer Science University of Oviedo

Architectural styles

Define the general shape of a system

They contain:

Elements: Components that carry out functionality Constraints: define how to integrate elements List of attributes:

Advantages/disadvantages of a style

slide-36
SLIDE 36

Software Architecture

School of Computer Science University of Oviedo

Are there pure styles?

Pure styles = idealization In practice, pure styles rarely appear Usually, systems deviate from pure styles... ...or combine several architectural styles It is important to understand pure styles in order to:

Understand pros and cons of a style Assess the consequences of a deviation from the style

slide-37
SLIDE 37

Software Architecture

School of Computer Science University of Oviedo

Architectural pattern

Reusable and general solution to some recurring problem that appears in a given context

Important parameter: problem

3 types:

Structural: Build time

Example: Layers

Runtime (behaviour)

Example: Pipes & filters

Deployment

Example: Load-balanced cluster

slide-38
SLIDE 38

Software Architecture

School of Computer Science University of Oviedo

Pattern vs style

Pattern = solution to a problem

Style = generic

Does not have to be associated with a problem

Style defines general architecture of an application

Usually, an application has one style

...but it can have several patterns

Patterns can appear at different scales

High level (architectural patterns) Design (design patterns) Implementation (idioms) . . .

slide-39
SLIDE 39

Software Architecture

School of Computer Science University of Oviedo

Pattern vs Style

Styles, in general, are independent of each other A pattern can be related with other patterns

A pattern composed of several patterns Interactions between patterns

slide-40
SLIDE 40

Software Architecture

School of Computer Science University of Oviedo

Pattern languages and catalogs

Pattern catalog

A set of patterns about a subject

It does not have to be exhaustive

Pattern language

A full pattern catalog about some subject

Goal: document all the possibilities They usually include relationships between patterns

Graphical map

slide-41
SLIDE 41

Software Architecture

School of Computer Science University of Oviedo

Example of pattern language Source: "SOA with REST" book

slide-42
SLIDE 42

Software Architecture

School of Computer Science University of Oviedo

Reference architectures

Blueprints that provide the

  • verall structure for

particular types of applications They contain several patterns Can be the de-facto standard in some domains

Fuente: Microsoft Application Architecture Guide, 2nd Ed.

slide-43
SLIDE 43

Software Architecture

School of Computer Science University of Oviedo

Externally developed components

Technology stacks or families

MEAN (Mongo,Express,Angular,Node), LAMP (Linux,Apache,MySQL,PHP),...

Products:

COTS: Commercial Off The Self FOSS: Free Open Source Software

Be careful with licenses

Application frameworks

Reusable software component

Platforms

Provide complete infrastructure to build & execute applications

Example: JEE, Google Cloud

slide-44
SLIDE 44

Software Architecture

School of Computer Science University of Oviedo

slide-45
SLIDE 45

Software Architecture

School of Computer Science University of Oviedo

ADD: Attribute-driven design

Defines a software architecture based on QAs Recursive decomposition process

At each stage tactics and patterns are chosen to satisfy a set of QA scenarios

Input

  • QA requirements
  • Constraints
  • Architectural significant functional requirements

Output

  • First levels of module decomposition
  • Various views of the system as appropriate
  • Set of elements with assigned functionalities and the

interactions among the elements

slide-46
SLIDE 46

Software Architecture

School of Computer Science University of Oviedo

  • 7. Perform analysis of current design and review interation goal and

achievement of design purpose

ADD 3.0

Design purpose Primary functional requirements Quality attribute scenarios Constraints Architectural Principles/ Concerns

  • 1. Review inputs
  • 2. Stablish iteration goal by selecting drivers
  • 3. Choose 1 or more elements of the system to refine
  • 4. Choose 1 or more design concepts that satisfy the selected drivers
  • 5. Instantiate architectural elements, allocate responsibilities and define

interfaces

  • 6. Sketch views and record design decisions

(Refined) Software architecture Design Iterate if necessary From previous round of iterations or from existing system (brownfield development) Leyend Driver Architecture design Precedence step Precedence Artifact flow

slide-47
SLIDE 47

Software Architecture

School of Computer Science University of Oviedo

Record design decisions

Every design decision is good enough but seldom

  • ptimal

It is necessary to record justification and risks affected Things to record:

What evidence was provided to justify the decision? Who did that? Why were shortcuts taken? Why were trade-offs made? What assumptions did you made?

Driver Design decisions and location Rationale and assumptions QA-1 Introduce concurrency (tactic) in the TimeServerConnector and FaultDetectionService Concurrency should be introduced to be able to receive and process several events simultaneously QA-2 Use of a messaging pattern through the introduction of a message queue in the communications layer Although the use of a message queue may seem to go against the performance imposed by the scenario, it hill be helpful to support QA-3 . . . . . . . . .

slide-48
SLIDE 48

Software Architecture

School of Computer Science University of Oviedo

slide-49
SLIDE 49

Software Architecture

School of Computer Science University of Oviedo

Architectural issues

Risks Unknowns Problems Technical debt Gaps in understanding Erosion Drift

slide-50
SLIDE 50

Software Architecture

School of Computer Science University of Oviedo

Risks

Risk = something bad that might happen but hasn't happened yet Risks should be identified and recorded

Risks can appear as part of QA scenarios

Risks can be mitigated or accepted

If possible, identify mitigation tasks

slide-51
SLIDE 51

Software Architecture

School of Computer Science University of Oviedo

Unknowns

Sometimes we don't have enough information to know if an architecture satisfies the requirements

Under-specified requirements Implicit assumptions Changing requirements ...

Architecture evaluations can help turn unknown unknowns into known unknowns

slide-52
SLIDE 52

Software Architecture

School of Computer Science University of Oviedo

Problems

Problems are bad things that have already passed

They arise when one makes design decisions that just doesn't work out the desired way They can also arise because the context changed

A decision that was a good idea but no longer makes sense

Problems can be fixed or accepted

Problems that are not fixed can lead to technical debt

slide-53
SLIDE 53

Software Architecture

School of Computer Science University of Oviedo

Technical debt

Debt accrued when knowingly or unknowingly wrong or non-

  • ptimal design decisions are taken

If one pays the instalments the debt is repaid and doesn't create further problems Otherwise, a penalty in the form of interest is applicable If one is not able to pay the bill for a long time the total debt is so large that one must declare bankruptcy In software terms, it would mean the product is abandoned

Several types: Code debt: Bad or inconsistent coding style Design debt: Design smells Test debt: Lack of tests, inadequate test coverage,... Documentation debt: No documentation for important concerns, outdated documentation,...

slide-54
SLIDE 54

Software Architecture

School of Computer Science University of Oviedo

Gaps in understanding

They arise when what stakeholders think about an architecture doesn't match the design

In rapidly evolving architectures gaps can arise quickly and without warning

Gaps can be addressed though education

Presenting the architecture Asking questions to stakeholders

slide-55
SLIDE 55

Software Architecture

School of Computer Science University of Oviedo

Architectural erosion (drift)

Gap between designed and as-built architecture

The implemented system almost never turns out the way the architect imagined it Without vigilance, the architecture drifts from the planned design a little bit every day until the implemented system bears little resemblance to the plan

Architecturally evident code can mitigate drift

slide-56
SLIDE 56

Software Architecture

School of Computer Science University of Oviedo

Contextual drift

It happens any time business or context drivers change after a design decision has been taken

It is necessary to continually revisit requirements Evolutionary architecture

slide-57
SLIDE 57

Software Architecture

School of Computer Science University of Oviedo

slide-58
SLIDE 58

Software Architecture

School of Computer Science University of Oviedo

Architecture evaluation

ATAM (Architecture Trade-off Analysis Method)

Architecture evaluation method

Simplified version of ATAM:

  • Present business drivers
  • Present architecture
  • Identify architecture approaches
  • Generate quality attribute utility tree
  • Analyse architectural approaches
  • Present results
slide-59
SLIDE 59

Software Architecture

School of Computer Science University of Oviedo

Cost Benefit Analysis Method (CBAM)

  • 1. Choose scenarios and architectural strategies
  • 2. Assess quality attribute benefits
  • 3. Quantify the benefits of architectural strategies
  • 4. Quantify the costs and schedule implications of

the architectural strategies

  • 5. Calculate the desirability of each option
  • 6. Make architectural design decisions
slide-60
SLIDE 60

Software Architecture

School of Computer Science University of Oviedo

Laws of Software architecture

Everything in software architecture is a tradeoff. —1st Law of Software Architecture

If an architect thinks they have discovered something that isn’t a tradeoff, more likely they just haven’t identified the tradeoff yet. —Corollary 1