introduction to software architecture. software architecture definition definition. a software...

32
Introduction to Software Architecture

Post on 20-Dec-2015

236 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Introduction to Software Architecture

Page 2: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Software Architecture Definition

Definition. A software system’s architecture is the set of principal design decisions about the system.

Software architecture is the blueprint for a software system’s construction and evolution.

Page 3: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Design Decisions

Design decisions encompass every aspect of the system under development

This includes design decisions related to– Structure– Behavior– Interaction– Non-functional properties

Page 4: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Defining “Principal”

“Principal” implies a degree of importance that grants a design decision “architectural status”.

It also implies that not all design decisions are architectural, that is, they do not necessarily impact a system’s architecture.

How one defines “principal” will depend on what the stakeholders define as the system goals.

Page 5: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Software Architecture as a Field of Study

Software architecture is a field of study that is characterized by an unusual diversity of views and understandings of some fundamental concepts.

A quick search of the internet will yield many definitions of architecture for example.

Page 6: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Other Definitions of Software Architecture

Perry and Wolf– Software Architecture = { Elements, Form, Rationale }

what how why

Shaw and Garlan– Software architecture [is a level of design that] involves

• the description of elements from which systems are built, • interactions among those elements, • patterns that guide their composition, and • constraints on these patterns.

Kruchten– Software architecture deals with the design and

implementation of the high-level structure of software.– Architecture deals with abstraction, decomposition,

composition, style, and aesthetics.

Page 7: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Temporal Aspect

Design decisions are and unmade over a system’s lifetime

Architecture has a temporal aspect.

A system’s architecture will change over time. However, at any given point in time, the system has only one architecture.

Page 8: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Prescriptive vs. Descriptive Architecture

A system’s prescriptive architecture captures the design decisions made prior to the system’s construction.

– It is the as-designed or as-intended architecture.

A system’s descriptive architecture describes how the system has been built.

– It is the as-implemented or as-realized architecture.

“… about the structure of the system”

Page 9: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Why prescriptive architecture?

Act as the set of rules by which all stakeholders have to play– “rules of the road” for various projects within

organization to align well with business goals

Act as the technology product blueprint– for intranet application: list of products to buy

Reduces deployment risk for organization– tried and tested models

“…architecture is about principles and guidelines”

Page 10: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

As-Designed vs. As-Implemented Architecture

Page 11: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

As-Designed vs. As-Implemented Architecture

Page 12: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

As-Designed vs. As-Implemented Architecture

Which architecture is “correct”? Are the two architectures consistent with

one another? What criteria are used to establish the

consistency between the two architectures? On what information is the answer to the

preceding questions based?

Page 13: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Architectural Evolution

When a system evolves, ideally its prescriptive architecture is modified first.

Unfortunately often the system and thus its descriptive architecture is often directly modified.

This failure of update happens because of– Developer sloppiness– Perception of short deadlines which prevent thinking

through and documenting – Lack of documented prescriptive architecture– Need or desire for code optimizations– Inadequate techniques or tool support

Page 14: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Architectural Drift and Architectural Erosion

Definition. Architectural drift involves architectural design decisions that are applied directly to a system’s descriptive architecture, but are not properly reflected in the system’s prescriptive architecture.

– Leads to inadaptability; results in lack of coherence

Definition. Architectural erosion involves architectural design decisions that are applied directly to a system’s descriptive architecture, and that violate design decisions captured by the system’s prescriptive architecture. E.g., “load bearing walls”

– Leads to disastrous results

Page 15: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Architectural Recovery

If drift or erosion are allowed to occur, the development organization is likely to be forced to recover the system’s architecture sooner or later.

Definition. Architectural recovery is the process of determining a software system’s architecture from its implementation-level artifacts.

Implementation-level artifacts can be– Source code– Executable files– Java .class files

Page 16: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Deployment

A software system cannot fulfill its purpose until it is deployed, that is, until its executable modules are physically placed on the hardware devices on which they are supposed to run.

The deployment view of an architecture can be critical in assessing whether the system will be able to satisfy its requirements.

Possible assessment dimensions– Sufficient memory– Power consumption– Available and required bandwidth

Page 17: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

A System’s Deployment Architecture Model

Page 18: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Software Architecture’s Elements

A software system’s architecture typically is not (and should not be) a uniform monolith.

A software system’s architecture should be a composition and interplay of different elements

– Processing – Data, also referred as information or state– Interaction

Page 19: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Component

Elements that encapsulate processing and data in a system’s architecture are referred to as software components.

Definition. A software component is an architectural building block that encapsulates a subset of the system’s functionality and/or data, and restricts access to them via an explicitly defined interface.

Page 20: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Connector

In complex systems interaction might become more important and challenging than the functionality of the individual components.

Definition. A software connector is an architectural building block tasked with regulating interactions among components.

In traditional, desktop software systems, connectors would have usually manifested themselves as simple procedure calls or shared data accesses.

Page 21: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Connector Examples

Connector Examples– Procedure call connectors – Shared memory connectors – Message passing connectors – Streaming connectors (e.g.. stream music from

devices)– Distribution connectors (distribute s/w to clients)– Wrapper connectors (data, object wrapper)

Components provide application-specific services.

Connectors are application-independent.

Page 22: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Configuration

Components and connectors are composed in a specific way in a given system’s architecture to accomplish that system’s objective.

Definition. Architectural configurations, or topologies, capture architectural structure via graphs whose nodes represent components and connectors, and whose edges represent their interconnectivity that describes architectural structure.

Page 23: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

An Example Configuration

Page 24: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Architectural Style

Observation– Certain design choices regularly result in solutions with

superior properties. – Compared to other possible alternatives, solutions such

as this are more elegant, effective, efficient, dependable, evolvable, scalable, and so on.

Definition. An architectural style is a named collection of architectural design decisions that

– are applicable in a given development context– constrain architectural design decisions that are specific

to a particular system within that context– elicit beneficial qualities in each resulting system.

Page 25: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Architectural Pattern

Definition. An architectural pattern is a set of architectural design decisions that are applicable to a recurring design problem, and parameterized to account for different software development contexts in which that problem appears.

An example pattern that is used widely in modern distributed systems is the three-tiered system pattern.

Three-tiered system applications– science, banking, e-commerce, reservation systems

Page 26: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Three-tiered architectural pattern

Front Tier: functionality to access the system’s services

Middle Tier: contains the application’s major functionality

Back Tier: contains the application’s data access and storage functionality.

Page 27: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Architectural Models,Views, and Visualizations

Architecture Model– An artifact documenting some or all of the architectural

design decisions about a system (structural, process, interface, and deployment)

Architecture Visualization– A way of depicting some or all of the architectural

design decisions about a system to a stakeholder. E.g. Structure101

Architecture View– A set of elements and the relations among them;

module, components and connectors, allocation view.

Page 28: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Architectural Processes

Architectural Analysis encompasses activities such as:

– Determining whether the set of design decisions comprising an architecture are consistent

– Determining whether an implemented system conforms to the set of design decisions in the architecture

Architectural Evolution: – The process of modifying the architectural design

decisions for a system.

Page 29: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Scope of Software ArchitectureEvery system has an architecture

Details of the architecture are a reflection of system requirements and trade-offs made to satisfy them

Possible decision factors– Performance– Compatibility with legacy software– Planning for reuse– Distribution profile

• Current and future

– Safety, security, fault tolerance requirements– Evolvability needs

• Changes to processing algorithms• Changes to data representation• Modifications to the structure/functionality

Page 30: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

What Makes a “Good” Architecture?

Process observations:– Product of architect(s)– List of quality attributes and functional

requirements– Architecture is well-documented– Circulated to stakeholders– Analyzed for quantitative measure and evaluate

for quality attributes– Results in a specific set of resource contention

areas (e.g. network utilization)

Page 31: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Product observations:– Well-defined modules with well-defined interface– Achieve quality attributes using architectural

strategy– Should not depend on particular version of a

commercial product– Allows modifiability– Feature well-defined processes or tasks

What Makes a “Good” Architecture?

Page 32: Introduction to Software Architecture. Software Architecture Definition  Definition. A software system’s architecture is the set of principal design

Why is SA Important?

Communication among stakeholders

Early design decisions

Transferable abstraction of a system