50
UNDERSTANDING QUALITY ATTRIBUTES Session - 4 06/13/22 02:28 AM SEPS ZG651 Software Architectures 1

Software Architecture Session4

Embed Size (px)

DESCRIPTION

Software Architecture

Citation preview

Page 1: Software Architecture Session4

UNDERSTANDING QUALITY ATTRIBUTES

Session - 4

04/13/23 01:43 PM SEPS ZG651 Software Architectures 1

Page 2: Software Architecture Session4

Quality and Architecture

• “ The mapping of functionality on software structures determines the architecture's support for quality ”

• Alternative mappings are possible but are not equally good

• Architecture decomposition by itself enables (or hinders) quality

04/13/23 01:43 PM SEPS ZG651 Software Architectures 2

Page 3: Software Architecture Session4

Architecture influence

• Architecture is critical to the realization of many qualities (design and evaluation)

• Architecture by itself is unable to achieve qualities

• Qualities are never achieved in isolation

04/13/23 01:43 PM SEPS ZG651 Software Architectures 3

Page 4: Software Architecture Session4

Problems with quality attributes

• QA's have non-operational definitions• The concerns of QA's overlap• Each QA community develops its own

vocabulary

04/13/23 01:43 PM SEPS ZG651 Software Architectures 4

Page 5: Software Architecture Session4

Quality attributes

• Quality of the system• Quality of the architecture• Quality of the business environment [Bass]• Product quality requirements• Organizational quality requirements• External quality requirements [Sommerville]

04/13/23 01:43 PM SEPS ZG651 Software Architectures 5

Page 6: Software Architecture Session4

Quality Attribute Scenarios

• Quality Attribute Scenario is a quality-attribute-specific requirement.

• There are 6 parts (Figure 4.1):1. Source of stimulus2. Stimulus – a condition that needs to be considered3. Environment - what are the conditions when the stimulus occurs?4. Artifact – what elements of the system are stimulated5. Response6. Response measure – when the response occurs it should be measurable so that the requirement can be tested

04/13/23 01:43 PM SEPS ZG651 Software Architectures 6

Page 7: Software Architecture Session4

QA scenarios

• General scenario for availability

04/13/23 01:43 PM SEPS ZG651 Software Architectures 7

Page 8: Software Architecture Session4

QA scenario example: availability

• (sample) concrete scenario for availability

04/13/23 01:43 PM SEPS ZG651 Software Architectures 8

Page 9: Software Architecture Session4

QA-specific tables

• Availability-specific table

04/13/23 01:43 PM SEPS ZG651 Software Architectures 9

Scenario Portion Possible Values

Source Internal to system; external to system

Stimulus Crash, timing, no response, incorrect response

Artifact System’s processors, communication channels,persistent storage, processes

Environment Normal operation; degraded (failsafe) mode

Response Detect event and: log the failure| notify users/operators| be unavailable| continue in normal/degraded mode

Response Measure Time interval when system must be available,availability/response time, unavailability time interval

Page 10: Software Architecture Session4

Quality Attribute ScenarioGeneration• Architect’s Goal: generate meaningful quality

attribute requirements for the systemQuality-attribute-specific tables->General scenarios -> System

specific scenarios

04/13/23 01:43 PM SEPS ZG651 Software Architectures 10

Page 11: Software Architecture Session4

Scenarios in Practice: Availability

• Availability is concerned with system failure and its associated consequences.

• A system failure occurs when the system no longer delivers a service consistent with its specification.

• Such a failure is observable by the system's users—either humans or other systems.

04/13/23 01:43 PM SEPS ZG651 Software Architectures 11

Page 12: Software Architecture Session4

Scenarios in Practice: Modifiability

• Modifiability is about the cost of change. It brings up two concerns.1. What can change (the artifact)? A change can occur to any aspect

of a system, most commonly the functions that the system computes, the platform the system exists on (the hardware, operating system, middleware, etc.)

2. When is the change made and who makes it (the environment)? Most commonly in the past, a change was made to source code. That is, a developer had to make the change, which was tested and then deployed in a new release

04/13/23 01:43 PM SEPS ZG651 Software Architectures 12

Page 13: Software Architecture Session4

Scenarios in Practice: Performance

• Performance is about timing. Events (interrupts, messages, requests from users, or the passage of time) occur, and the system must respond to them.

• There are a variety of characterizations of event arrival and the response but basically performance is concerned with how long it takes the system to respond when an event occurs.

04/13/23 01:43 PM SEPS ZG651 Software Architectures 13

Page 14: Software Architecture Session4

Performance examples

• A Web-based financial services system gets events from its users (possibly numbering in the tens or hundreds of thousands). – For the Web-based financial system, the response might be the

number of transactions that can be processed

• An engine control system gets its requests from the passage of time and must control both the firing of the ignition when a cylinder is in the correct position and the mixture of the fuel to maximize power and minimize pollution.– For the engine control system, the response might be the variation in

the firing time

04/13/23 01:43 PM SEPS ZG651 Software Architectures 14

Page 15: Software Architecture Session4

Scenarios in Practice: Security

• Security is a measure of the system's ability to resist unauthorized usage while still providing its services to legitimate users.

• An attempt to breach security is called an attack and can take a number of forms. – It may be an unauthorized attempt to access data or

services or to modify data. – It may be intended to deny services to legitimate users.

04/13/23 01:43 PM SEPS ZG651 Software Architectures 15

Page 16: Software Architecture Session4

Characterization of Security

• Security can be characterized as a system providing nonrepudiation, confidentiality, integrity, assurance, availability, and auditing

04/13/23 01:43 PM SEPS ZG651 Software Architectures 16

Page 17: Software Architecture Session4

Nonrepudiation (Security)

• is the property that a transaction (access to or modification of data or services) cannot be denied by any of the parties to it.

• This means you cannot deny that you ordered that item over the Internet if, in fact, you did.

04/13/23 01:43 PM SEPS ZG651 Software Architectures 17

Page 18: Software Architecture Session4

Confidentiality(Security)

• is the property that data or services are protected from unauthorized access.

• This means that a hacker cannot access your income tax returns on a government computer.

04/13/23 01:43 PM SEPS ZG651 Software Architectures 18

Page 19: Software Architecture Session4

Integrity (Security)

• is the property that data or services are being delivered as intended.

• This means that your grade has not been changed since your instructor assigned it.

04/13/23 01:43 PM SEPS ZG651 Software Architectures 19

Page 20: Software Architecture Session4

Assurance

• is the property that the parties to a transaction are who they purport to be.

• This means that, when a customer sends a credit card number to an Internet merchant, the merchant is who the customer thinks they are.

04/13/23 01:43 PM SEPS ZG651 Software Architectures 20

Page 21: Software Architecture Session4

Availability (Security)

• is the property that the system will be available for legitimate use.

• This means that a denial-of-service attack won't prevent your ordering a product.

04/13/23 01:43 PM SEPS ZG651 Software Architectures 21

Page 22: Software Architecture Session4

Auditing (Security)

• is the property that the system tracks activities within it at levels sufficient to reconstruct them.

• This means that, if you transfer money out of one account to another account, in Switzerland, the system will maintain a record of that transfer.

04/13/23 01:43 PM SEPS ZG651 Software Architectures 22

Page 23: Software Architecture Session4

Scenarios in Practice: Testability

• Software testability refers to the ease with which software can be made to demonstrate its faults through (typically execution-based) testing.

• At least 40% of the cost of developing well-engineered systems is taken up by testing. If the software architect can reduce this cost, the payoff is large.

04/13/23 01:43 PM SEPS ZG651 Software Architectures 23

Page 24: Software Architecture Session4

Scenarios in Practice: Usability

• Usability is how easy is it for the user to accomplish tasks and what support the system provides for the user to accomplish this.

• Dimensions:– Learning system features– Using the system efficiently– Minimizing the impact of errors– Adapting the system to the user’s needs– Increasing confidence and satisfaction

04/13/23 01:43 PM SEPS ZG651 Software Architectures 24

Page 25: Software Architecture Session4

General Scenario Generation:Usability

04/13/23 01:43 PM SEPS ZG651 Software Architectures 25

Scenario Portion Possible Values

Source End user

Stimulus Wants to: learn system, use system, recover from errors, adapt system, feel comfortable

Artifact System

Environment At runtime, or configure time, install-time

Response Measure Task time, number of errors, number of tasksaccomplished, user satisfaction, gain of user knowledge,amount of time. data lost

Page 26: Software Architecture Session4

Usability Scenarios in Practice : Responses• System responses to stimuli:• To learn system

– Help system is context sensitive– Interface familiar, consistent

• To use system efficiently– Reuse of command or data already entered– Navigation support, comprehensive searching

• To recover from errors– Undo, cancel, recover from system failures– Forgotten passwords

• To adapt system: customize the system to user liking; internationalization– To feel comfortable:– Display system state– Undo, cancel, recover from system failures

04/13/23 01:43 PM SEPS ZG651 Software Architectures 26

Page 27: Software Architecture Session4

04/13/23 01:43 PM SEPS ZG651 Software Architectures 27

Communicating concepts usinggeneral scenarios: Stimuli

Attribute Stimulus

Availability Unexpected event, non-occurrence of expected event

Modifiability Request to add/delete/modify functionality, platform,quality-attribute or capacity

Performance Periodic, stochastic or sporadic

Security Attempt to access/display/modify information orresources; reduce availability of system

Testability Completion of phase of system development

Usability User wants to: learn, use, minimize impact or errors,adapt the system, feel comfortable

Page 28: Software Architecture Session4

Other Quality Attributes

• Scalability• Portability• Interoperability

04/13/23 01:43 PM SEPS ZG651 Software Architectures 28

Page 29: Software Architecture Session4

Business Qualities

• In addition to the qualities that apply directly to a system, a number of business quality goals frequently shape a system's architecture.

• These goals center on cost, schedule, market, and marketing considerations.

04/13/23 01:43 PM SEPS ZG651 Software Architectures 29

Page 30: Software Architecture Session4

Time to market (Business Qualities)

• If there is competitive pressure or a short window of opportunity for a system or product, development time becomes important.

• Time to market is often reduced by using prebuilt elements such as commercial off-the-shelf (COTS) products or elements re-used from previous projects.

• The ability to insert or deploy a subset of the system depends on the decomposition of the system into elements.

04/13/23 01:43 PM SEPS ZG651 Software Architectures 30

Page 31: Software Architecture Session4

Cost and benefit (Business Qualities)• The development effort will naturally have a budget that

must not be exceeded. • Different architectures will yield different development

costs. – For instance, an architecture that relies on technology (or expertise

with a technology) not resident in the developing organization will be more expensive to realize than one that takes advantage of assets already inhouse.

– An architecture that is highly flexible will typically be more costly to build than one that is rigid (although it will be less costly to maintain and modify).

04/13/23 01:43 PM SEPS ZG651 Software Architectures 31

Page 32: Software Architecture Session4

Projected lifetime of the system (Business Qualities)• If the system is intended to have a long lifetime,

modifiability, scalability, and portability become important.

• But building in the additional infrastructure (such as a layer to support portability) will usually compromise time to market.

• On the other hand, a modifiable, extensible product is more likely to survive longer in the marketplace, extending its lifetime.

04/13/23 01:43 PM SEPS ZG651 Software Architectures 32

Page 33: Software Architecture Session4

Targeted market (Business Qualities)• For general-purpose (mass-market) software, the

platforms on which a system runs as well as its feature set will determine the size of the potential market.

• Thus, portability and functionality are key to market share.

• Other qualities, such as performance, reliability, and usability also play a role.

04/13/23 01:43 PM SEPS ZG651 Software Architectures 33

Page 34: Software Architecture Session4

Rollout schedule (Business Qualities)• If a product is to be introduced as base

functionality with many features released later, the flexibility and customizability of the architecture are important.

• Particularly, the system must be constructed with ease of expansion and contraction in mind

04/13/23 01:43 PM SEPS ZG651 Software Architectures 34

Page 35: Software Architecture Session4

Integration with legacy systems (Business Qualities)• If the new system has to integrate with existing

systems, care must be taken to define appropriate integration mechanisms. – For example, the ability to integrate a legacy system with

an HTTP server to make it accessible from the Web has been a marketing goal in many corporations over the past decade.

• The architectural constraints implied by this integration must be analyzed.

04/13/23 01:43 PM SEPS ZG651 Software Architectures 35

Page 36: Software Architecture Session4

Architecture Qualities

• Conceptual integrity - is the underlying theme or vision that unifies the design of the system at all levels. The architecture should do similar things in similar ways.

• Correctness and completeness - are essential for the architecture to allow for all of the system's requirements and runtime resource constraints to be met.

• Buildability - allows the system to be completed by the available team in a timely manner and to be open to certain changes as development progresses.

04/13/23 01:43 PM SEPS ZG651 Software Architectures 36

Page 37: Software Architecture Session4

Exercise

• For the system you are currently working on, what are the most important qualities?

• What are the system-specific scenarios that capture these qualities and what are the general scenarios they make concrete?

04/13/23 01:43 PM SEPS ZG651 Software Architectures 37

Page 38: Software Architecture Session4

Summary

• Quality requirements must be characterized in a disciplined way to control the extent to which they are fulfilled in the software architectural.

• Tactics define how to achieve a quality attribute, and architectural patterns provide ready-to-use architectural solutions to realize them.

04/13/23 01:43 PM SEPS ZG651 Software Architectures 38

Page 39: Software Architecture Session4

01:43 PM 39SEPS ZG651 Software Architectures

Page 40: Software Architecture Session4

ACHIEVING QUALITIES

Session - 5

04/13/23 01:43 PM SEPS ZG651 Software Architectures40

Page 41: Software Architecture Session4

Tactics

• A tactic is a design decision that influences the control of a quality attribute response.

04/13/23 01:43 PM SEPS ZG651 Software Architectures 41

Page 42: Software Architecture Session4

Achieving quality attributes

• Achieving quality attributes– Tactics: guidance for the architect on how to achieve

them (fundamental design decisions)– Given a QA, tactics help the architect to design using

design patterns and architectural strategies or patterns• E.g. given the business goal “time-to-market,” the architectural

solution would be to decompose the system to ease parallel development by multiple teams

• Quality Attribute Requirements -> Architectural Decisions

04/13/23 01:43 PM SEPS ZG651 Software Architectures 42

Page 43: Software Architecture Session4

Example Tactic

• An example tactic is:– – “introduce redundancy” to increase availability

• This would require “synchronization” also.Thus note:

– Tactics can influence/refine other tactics.– Tactics will be grouped into “patterns”

• A pattern to support availability would include a

– Redundancy-tactic and a synchronization-tactic– Tactics are going to be grouped hierarchically (trees)

04/13/23 01:43 PM SEPS ZG651 Software Architectures 43

Page 44: Software Architecture Session4

Availability Tactics• Recall the availability quality attribute from last time

– Def: when the system fails to deliver a service …– Failure vs fault – a collection of faults “may” cause a failure– Availability Scenario generation table (Tab. 4.1)

• Availability tactics– Will keep faults from becoming failures– Or at least limit the effects of a fault– Approaches to maintain include:

• Some type of redundancy; some type of monitoring to detect failures; some type of recovery

04/13/23 01:43 PM SEPS ZG651 Software Architectures 44

Page 45: Software Architecture Session4

Hierarchy of tactics: availability

04/13/23 01:43 PM SEPS ZG651 Software Architectures 45

Page 46: Software Architecture Session4

Patterns’ role

04/13/23 01:43 PM SEPS ZG651 Software Architectures 46

Page 47: Software Architecture Session4

An example: Modifiability

• Goal: Control the time and cost to implement, test, and deploy changes– Localize modifications– Prevent the ripple

effect– Defer binding time

04/13/23 01:43 PM SEPS ZG651 Software Architectures 47

Page 48: Software Architecture Session4

Patterns’ role: modifiability example

04/13/23 01:43 PM SEPS ZG651 Software Architectures 48

Page 49: Software Architecture Session4

Summary

• Quality requirements must be characterized in a disciplined way to control the extent to which they are fulfilled in the software architectural.

• Tactics define how to achieve a quality attribute, and architectural patterns provide ready-to-use architectural solutions to realize them.

04/13/23 01:43 PM SEPS ZG651 Software Architectures 49

Page 50: Software Architecture Session4

01:43 PM 50SEPS ZG651 Software Architectures