Architectural Adaptation Software Architecture Lecture 25 Copyright Richard

  • Slides: 32
Download presentation
Architectural Adaptation Software Architecture Lecture 25 Copyright © Richard N. Taylor, Nenad Medvidovic, and

Architectural Adaptation Software Architecture Lecture 25 Copyright © Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy. All rights reserved.

Software Architecture: Foundations, Theory, and Practice Adaptation l l Change is endemic to software

Software Architecture: Foundations, Theory, and Practice Adaptation l l Change is endemic to software u perceived and actual malleability of software induces stakeholders to initiate changes, e. g. : l Users want new features l Designer wants to improve performance l Application environment is changing Adaptation: modification of a software system to satisfy new requirements and changing circumstances 2

Software Architecture: Foundations, Theory, and Practice Goals of this Lecture l l l Characterize

Software Architecture: Foundations, Theory, and Practice Goals of this Lecture l l l Characterize adaptation, showing what changes, why, and who the players are Characterize the central role software architecture plays in system adaptation Present techniques for effectively supporting adaptation, based on an architecture-centric perspective 3

Software Architecture: Foundations, Theory, and Practice Sources and Motivations for Change l l l

Software Architecture: Foundations, Theory, and Practice Sources and Motivations for Change l l l Corrective Changes u Bug fixes Modification to the functional requirements u New features are needed u Existing ones modified u Perhaps some must be removed New or changed non-functional system properties u Anticipation of future change requests Changed operating environment Observation and analysis 4

Software Architecture: Foundations, Theory, and Practice Changes Arising from Product Line Forces l l

Software Architecture: Foundations, Theory, and Practice Changes Arising from Product Line Forces l l l Creating a new variant u Change at branch point u E. g. : Adding an integrated TV/DVD device to a TV product line Creation of a new branch point Merging product (sub)lines u Rationalizing their architectures 5

Software Architecture: Foundations, Theory, and Practice Motivation for Online Dynamic Change l l l

Software Architecture: Foundations, Theory, and Practice Motivation for Online Dynamic Change l l l Non-stop applications u software cannot be stopped because the “application” cannot be stopped u E. g. , 24/7 systems Maintaining user or application state u stopping the software would cause the user to lose (mental) context u saving and/or recreating the software’s application state would be difficult or costly Re-installation difficulty u applications with complex installation properties u E. g. , software in an automobile 6

Software Architecture: Foundations, Theory, and Practice Stewart Brand’s Shearing Layers of Change l l

Software Architecture: Foundations, Theory, and Practice Stewart Brand’s Shearing Layers of Change l l “How Buildings Learn – What happens after they’re built” examines how and why buildings change over time Categorization of types of change according to the nature and cost of making a change 7

Software Architecture: Foundations, Theory, and Practice Shearing Layers in a Building 8 Figure adapted

Software Architecture: Foundations, Theory, and Practice Shearing Layers in a Building 8 Figure adapted from “How Buildings Learn”; Stewart Brand, © 1994 Stewart Brand.

Software Architecture: Foundations, Theory, and Practice The Six Shearing Layers l l l Site:

Software Architecture: Foundations, Theory, and Practice The Six Shearing Layers l l l Site: the geographical setting, the urban location, and the legally defined lot u its boundaries and context outlast generations of ephemeral buildings. Structure (“the building”): the foundation and loadbearing elements u perilous and expensive to change, so people don’t Skin: exterior surfaces u change every ~20 years, to keep up with fashion, technology, or for repair 9

Software Architecture: Foundations, Theory, and Practice The Six Shearing Layers (cont’d) l l l

Software Architecture: Foundations, Theory, and Practice The Six Shearing Layers (cont’d) l l l Services: working guts of a building: communications wiring, electrical wiring, plumbing, sprinkler systems, etc. Space Plan: interior layout – where walls, ceilings, floors, and doors go Stuff: chairs, desks, phones, pictures, kitchen appliances, lamps, hair brushes u things that switch around daily to monthly 10

Software Architecture: Foundations, Theory, and Practice To Shear or Not to Shear – Pompidou

Software Architecture: Foundations, Theory, and Practice To Shear or Not to Shear – Pompidou Center 11 Software Architecture: Foundations, Theory, and Practice ; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.

Software Architecture: Foundations, Theory, and Practice The Six Shearing Layers l l l Site

Software Architecture: Foundations, Theory, and Practice The Six Shearing Layers l l l Site Structure Skin Services Space Plan Stuff How do these relate to software architecture? 12

Software Architecture: Foundations, Theory, and Practice Changing Component Interiors l l A component’s performance

Software Architecture: Foundations, Theory, and Practice Changing Component Interiors l l A component’s performance may be improved by a change to the algorithm that it uses internally Capabilities that facilitate component adaptation u Knowledge of self and exposure of this knowledge to external entities u Knowledge of the component’s role in the larger architecture u Pro-active engagement of other elements of a system in order to adapt 13

Software Architecture: Foundations, Theory, and Practice Change of Component Interface l l In many

Software Architecture: Foundations, Theory, and Practice Change of Component Interface l l In many cases adaptation to meet modified functional properties entails changing a component’s interface Adaptors/wrappers are a popular technique to mitigate “ripple effect” u but, subsequent changes to previously unmodified methods become even more complex 14

Software Architecture: Foundations, Theory, and Practice Connector Change l l Typically changes to connectors

Software Architecture: Foundations, Theory, and Practice Connector Change l l Typically changes to connectors are motivated by u The desire to alter non-functional properties l such as distribution of components, fault-tolerance, efficiency, modifiability, etc. l increased independence of sub-architectures in the face of potential failures l improved performance The more powerful the connector the easier architectural change u E. g. , connectors supporting event-based communication u What is the downside? 15

Software Architecture: Foundations, Theory, and Practice Change in the Configuration l l l Changes

Software Architecture: Foundations, Theory, and Practice Change in the Configuration l l l Changes to the configuration of components and connectors represents fundamental change to a system’s architecture Effectively supporting such a modification requires working from an explicit model of the architecture Many dependencies between components will exist, and the architectural model is the basis for managing and preserving such relationships 16

Software Architecture: Foundations, Theory, and Practice Change Agents and Context (1) l Change Agents

Software Architecture: Foundations, Theory, and Practice Change Agents and Context (1) l Change Agents – Identity and Location u The processes that carry out adaptation may be performed by l human l automated agents l a combination thereof u If an adaptation agent is part of a deployed application from the outset, the potential is present for an effective adaptation process u Agent may have access to contextual information u E. g. , periodically a user of a desktop OS is notified when an OS or application upgrade is available 17

Software Architecture: Foundations, Theory, and Practice Change Agents and Context (2) l l Knowledge

Software Architecture: Foundations, Theory, and Practice Change Agents and Context (2) l l Knowledge u Agent might need knowledge to mitigate adaptation risk u Agent has to know the constraints that must be retained in the modified system u If the system’s architectural design decisions have been violated, architectural recovery will be required Degree of Freedom u Freedom that the engineer has in designing the changes u Greater freedom large solution space u By learning the constraints of the system, the coherence of the architecture can be retained 18

Software Architecture: Foundations, Theory, and Practice Time of Change 19 Software Architecture: Foundations, Theory,

Software Architecture: Foundations, Theory, and Practice Time of Change 19 Software Architecture: Foundations, Theory, and Practice ; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.

Software Architecture: Foundations, Theory, and Practice Architecture-Centric Adaptation l l In the absence of

Software Architecture: Foundations, Theory, and Practice Architecture-Centric Adaptation l l In the absence of explicit architecture the engineer is left to reason about adaptation u from memory u from source code Architecture can serve as the primary focus of reasoning about potential adaptations u Descriptive architecture is the reference point 20

Software Architecture: Foundations, Theory, and Practice Conceptual Architecture for Adaptation From: “An Architecture-based Approach

Software Architecture: Foundations, Theory, and Practice Conceptual Architecture for Adaptation From: “An Architecture-based Approach to Self-Adaptive Software”, Oreizy, et. al. IEEE Intelligent Systems, 14 (3), 1999. 21

Software Architecture: Foundations, Theory, and Practice Activities, Agents, and Entities l Adaptation management and

Software Architecture: Foundations, Theory, and Practice Activities, Agents, and Entities l Adaptation management and evolution management can be separated into three types of activities u Strategic refers to determining what to do u Tactical refers to developing detailed plans for achieving the strategic goals u Operations refers to the nuts-and-bolts of carrying out the detailed plans 22

Software Architecture: Foundations, Theory, and Practice Strategy, Tactics, and Operations 23 Software Architecture: Foundations,

Software Architecture: Foundations, Theory, and Practice Strategy, Tactics, and Operations 23 Software Architecture: Foundations, Theory, and Practice ; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.

Software Architecture: Foundations, Theory, and Practice Categories of Techniques l l l Observing and

Software Architecture: Foundations, Theory, and Practice Categories of Techniques l l l Observing and collecting state Analyzing data and planning change Describing change descriptions Deploying change descriptions Effecting the change 24

Software Architecture: Foundations, Theory, and Practice Architectures/Styles that Support Adaptation l l l Explicit

Software Architecture: Foundations, Theory, and Practice Architectures/Styles that Support Adaptation l l l Explicit models First-class connectors Adaptable connectors Message-based communication …others? 25

Software Architecture: Foundations, Theory, and Practice Architectures/Styles Supporting Adaptation l l l Application programming

Software Architecture: Foundations, Theory, and Practice Architectures/Styles Supporting Adaptation l l l Application programming interfaces (API) Scripting languages Plug-ins Component/object architectures Event interfaces 26

Software Architecture: Foundations, Theory, and Practice API-Based Extension 27 Software Architecture: Foundations, Theory, and

Software Architecture: Foundations, Theory, and Practice API-Based Extension 27 Software Architecture: Foundations, Theory, and Practice ; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.

Software Architecture: Foundations, Theory, and Practice Plug-In Based Extension 28 Software Architecture: Foundations, Theory,

Software Architecture: Foundations, Theory, and Practice Plug-In Based Extension 28 Software Architecture: Foundations, Theory, and Practice ; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.

Software Architecture: Foundations, Theory, and Practice Component-Object Approach 29 Software Architecture: Foundations, Theory, and

Software Architecture: Foundations, Theory, and Practice Component-Object Approach 29 Software Architecture: Foundations, Theory, and Practice ; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.

Software Architecture: Foundations, Theory, and Practice Scripting-Based Extension 30 Software Architecture: Foundations, Theory, and

Software Architecture: Foundations, Theory, and Practice Scripting-Based Extension 30 Software Architecture: Foundations, Theory, and Practice ; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.

Software Architecture: Foundations, Theory, and Practice Event-Based Extension 31 Software Architecture: Foundations, Theory, and

Software Architecture: Foundations, Theory, and Practice Event-Based Extension 31 Software Architecture: Foundations, Theory, and Practice ; Richard N. Taylor, Nenad Medvidovic, and Eric M. Dashofy; © 2008 John Wiley & Sons, Inc. Reprinted with permission.

Software Architecture: Foundations, Theory, and Practice The Special Problems of On-the-fly Change l The

Software Architecture: Foundations, Theory, and Practice The Special Problems of On-the-fly Change l The principle of quiescence u A node in the active state can initiate and respond to transactions. u The state identified as necessary for reconfiguration is the passive state, l node must respond to transaction l not currently engaged in a transaction that it initiated l it will not initiate new transactions 32