Docsity

Software Architectures: Tactics and Architectural Styles, Thesis of Software Engineering

Partial preview of the text

Download Software Architectures: Tactics and Architectural Styles and more Thesis Software Engineering in PDF only on Docsity!

Lecture 2

Software Architectures

Roadmap of the course

๏‚— What is software architecture?

๏‚— Designing Software Architecture

๏‚— Requirements: quality attributes or qualities ๏‚— Today ๏‚— How to achieve requirements : tactics ๏‚— Next time: ๏‚— How do tactics lead to architectural styles ๏‚— Case studies on architectural styles

Architectural style

๏‚— A package of tactics

๏‚— Tactics can refine other tactics ๏‚— Redundancy is refined by data redundancy, code redundancy

๏‚— Example

๏‚— One availability tactic: introduce redundancy ๏‚— Implication: we also need synchronization of replicas ๏‚— To ensure the redundant copy can be used if the original fails

Availability tactics

๏‚— Failure

๏‚— Deviation from intended functional behavior ๏‚— Observable by system users

๏‚— Failure vs fault

๏‚— Fault: event which may cause a failure

๏‚— Availability tactics

๏‚— Keep faults from becoming failures ๏‚— Make possible repairments

Fault detection: Ping/Echo

๏‚— Comp. 1 issues a โ€pingโ€ to comp. 2

๏‚— Comp. 1 expects an โ€echoโ€ from comp. 2

๏‚— Answer within predefined time period

๏‚— Usable for a group of components

๏‚— Mutually responsible for one task

๏‚— Usable for client/server

๏‚— Tests the server and the communication path

๏‚— Hierarchy of fault detectors improves

bandwidth usage

Fault detection: Heartbeat

๏‚— Comp. 1 emits a โ€heartbeatโ€ message periodically

๏‚— Comp. 2 listens for it

๏‚— If heartbeat fails

๏‚— Comp. 1 assumed failed ๏‚— Fault correcting comp. 3 is notified

๏‚— Heartbeat can also carry data

Component recovery: Voting

๏‚— Processes running on redundant processors take

equivalent input and compute output

๏‚— Output sent to voter

๏‚— Voter detects deviant behavior from a single processor

=> it fails it

๏‚— Method used to correct

๏‚— Faulty operation of algorithm ๏‚— Failure of a processor

Component recovery: active

redundancy

๏‚— All redundant components respond to events in

parallel => all in same state

๏‚— Response from only one comp used

๏‚— Downtime: switching time to another up-to-date component (ms)

๏‚— Used in client-server config (database syst)

๏‚— Quick responses are important

๏‚— Synchronization

๏‚— All messages to any redundant component sent to all redundant components

Component recovery: spare

๏‚— Standby spare computing platform configured to

replace many different failed components

๏‚— Must be rebooted to appropriate SW config ๏‚— Have its state initialized when failure occurs

๏‚— Checkpoint of system state and state changes to

persistent device periodically

๏‚— Downtime: minutes

Component reintroduction: shadow

operation

๏‚— Previously failed component may be run in

โ€shadowโ€ mode

๏‚— For a while ๏‚— To make sure it mimics the behavior of the working components ๏‚— Before restoring it to service

Component reintroduction:

checkpoint/ rollback

๏‚— Checkpoint

๏‚— Record of a consistent state ๏‚— Created periodically or in response to specific events

๏‚— Useful when a system fails unusually, with

detectably inconsistent state: system restored

using

๏‚— A previous checkpoint of a consistent state ๏‚— Log of transactions occurred since

Component prevention

๏‚— Removal from service

๏‚— Comp removed from operation to undergo some activities to prevent anticipated failures ๏‚— Exp: rebooting comp to prevent memory leaks ๏‚— Automatic (design architecture) or manual (design system)

๏‚— Transactions

๏‚— sequential steps bundled together, s.t. the whole bundle can be undone at once

๏‚— Process monitor

๏‚— If process fault detected, then monitoring process deletes non-performing process and creates new instance of it ๏‚— initialized to some appropriate state as in the spare tactic

Modifiability tactics (2)

Changes

Changes Made, Tested, Deployed Within Time and Budget

Modifiability

Localize changes

Prevention of ripple effects

Defer binding time Semantic coherence Anticipate expected changes Generalize module Abstract common services

Runtime registration Configuration files Polymorphism Component replacement Adherence to defined protocols

arrive

Hide information Maintain existing interface Restrict comm paths Use an Intermediary

Localize modifications: maintain

semantic coherence

๏‚— Semantic coherence: relationships among

responsibilities in a module

๏‚— Goal: ensure all these responsibilities work

together w/o excessive reliance on other modules

๏‚— Goal achievement: design modules with

responsibilities in semantic coherence