Chapter 3 - Envisioning Architecture
Chapter 3 - Envisioning Architecture
Tadele M.
Software Architecture: Definition
The software architecture of a program or computing
system is the set of structures of the system, which
comprise software elements, the externally visible
properties of those elements, and the relationships
among them.
The architectural view of a system is abstract, distilling
away details of implementation, algorithm, and data
representation and concentrating on the behaviour and
interaction of "black box" elements.
2
Software Architecture: Definition…
4
Definition from IEEE
5
The Architecture Business Cycle
For decades, software designers have been taught to
build systems based exclusively on the technical
requirements.
Software architecture is a result of technical, business,
and social influences.
Its existence, in turn, influences these technical,
business, and social environments.
This cycle of influences from the environment to
the architecture and back to the environment is
6
called the Architecture Business Cycle.
Where do Architectures Come From?
Architectures are influenced by:
Stakeholders
each stakeholder has different concerns & goals, some contradictory
architect often has to fill in the blanks and mediate the conflicts.
Development Organization
immediate business, long-term business, and organizational (staff
skills, schedule, & budget)
Background & Experience of the Architects
repeat good results, avoid duplicating disasters
The Technical Environment
standard industry practices or common SE techniques
7
Influence of system stakeholders on the architect
8
Ramifications of Influences
The properties required by the business and organizational
goals are seldom completely understood.
Architects need to know & understand the nature, source,
and priority of constraints on the project as early as
possible.
Architects must identify & actively engage the stakeholders to
solicit their needs & expectations.
Use architecture reviews & iterative prototyping.
In addition to technical skills, architects need to be skilled in
diplomacy, negotiation, and communication.
9
What Do Architectures Influence?
Architectures affect the factors that influence them, including:
The structure of the developing organization-Project context
The goals of developing organization- Business context
Customer requirements for the next system-Technical context
The architect’s experience with subsequent systems-
Professional context.
The software engineering culture.(i.e technical environment)
10
Influences on the Architecture
11
Software Processes & the ABC
12
Software Architecture Activities
Creating the business case for the system
Understanding the requirements from stakeholders
Creating or selecting the architecture via conceptual integrity
Communicating the architecture clearly and unambiguously to
all of the stakeholders
Analyzing or evaluating the qualities of the architecture
Implementing the system based on the architecture faithfully
according to the structures and interaction protocols
constrained.
Ensuring that the implementation conforms to the architecture
13
What makes a Good Architecture?
Given the same technical requirements for a system,
two different architects in two different
organizations, will produce different architectures.
Then how to decide which is the right one ?
Rules of thumb/observations that should be followed when
designing an architecture.
These are divided into two clusters:
1. Process recommendations
2. Product(structural) recommendations.
14
Rules of Thumb: Process recommendations
The architecture should be product of a single architect or small
group of architects.
gather both the functional requirements and a well specified,
prioritized list of quality attributes.
be well documented, with at least one static view and one dynamic
view.
be reviewed by the system’s stakeholders.
be analyzed for applicable quantitative measures and formally
evaluated for quality measures.
develop a “skeletal” system to facilitate incremental implementation.
15
Rules of Thumb: Product recommendations
The architecture should feature well-defined modules based on the
principles of information hiding and separation of concerns.
Each module should have a well-defined interface that hides
changeable aspects.
Quality attributes should be achieved using well-know architectural
tactics.
The architecture should be independent of particular versions of
commercial products or tools.
Modules that produce data should be separate from modules that
consume data for increased modifiability.
16
What is Software Architecture?
Quite often shown as box-and-arrow diagrams.
Unless we know precisely what the elements are & how they
cooperate to accomplish the purpose of the system, this
diagram is unhelpful!
18
Useful Concepts
Three stages that capture characteristics of an architecture, on
the way from box-and-arrow to full software architectures:
Architectural Patterns
Reference Models
Reference Architectures
Reference Model
Reference Software
Architecture Architecture
Architectural
Pattern
19
Architectural Patterns
A description of element & relation types together
with a set of constraints on how they may be used.
These constraints on an architecture define a set or
family of architectures.
For example, client-server is a common architectural
pattern.
Client and server are two element types,
and their coordination is described in terms of the protocol
that the server uses to communicate with
each of its clients.
20
Value of Patterns
They exhibit known quality attributes, and are a reuse of
experience.
Some patterns solve performance problems, others apply
to high-security systems, or high-availability goals.
Choosing an architectural pattern is often the architect’s
first major design decision.
Also referred to as architectural styles.
21
Reference Models
A division of functionality together with data flow between the
pieces.
A standard decomposition of a known problem into parts that
cooperatively solve the problem.
They arise from experience, and are thus a characteristic of
mature domains.
Examples:
Compilers: lexical analysis, syntactic analysis, semantic analysis,
optimization, code generation
Networks: the OSI reference model
22
Reference Architectures
A reference model mapped onto software elements and the
data flows between them.
The elements must cooperatively implement the
functionality defined in the reference model.
A reference model defines a way of decomposing functionalities
A reference architecture defines a way of mapping a functionalities on
subsystems/architectural components
The mapping may be 1-1, but an element may implement a
part of a function or several functions.
23
Structures and Views
A view is a representation of a coherent set of architectural
elements, consisting of:
a set of elements
the relationships among them
A structure is the set of elements itself, as they exist in
software or hardware.
Often used interchangeably, text will distinguish.
24
Why is Architecture Important?
Three fundamental reasons from a technical perspective:
Communication among stakeholders: a basis for mutual
understanding, negotiation, & consensus
User: reliable and available
Customer: on schedule and to budget;
Manager: cost and schedule, teams to work largely
independently
Architect: achieve all of those goals
Early design decisions: earliest point at which decisions
can be analyzed
Transferable abstraction of a system: can promote large-scale
25 reuse
Early design decisions
The architecture:
defines constraints on implementation
dictates organizational structure
inhibits or enables a system’s quality attributes
Predicting System Qualities by Studying the Architecture
easier to reason about and manage change
helps in evolutionary prototyping
enables more accurate cost & schedule estimates
26
Architecture as a transferable reusable model
The earlier in the life cycle re-use is applied, the greater the
benefit that can be achieved.
Not only code can be re-used but so can the requirements that
led to the architecture in the first place, as well as the
experience of building the re-used architecture.
When architectural decisions can be re-used across multiple
systems, all of the early decision consequences we just described
are also transferred.
27
Groups of Architectural Structures
Architectural structures can by and large be divided into three
groups, depending on the broad nature of the elements they
show.
Module structures: are static structures, in that they focus on the way the
system's functionality is divided up and assigned to implementation teams
Eg. Decomposition, uses, layered, class
Component-and-connector structures
runtime components (principal units of computation) and connectors
(communication vehicles among components)
Eg. Process (communication), concurrency, shared data (repository), client-
server
Allocation structures: show relationships between software elements
& external environments (system's organizational, developmental, installation, and execution)
28
Eg. Work assignment, deployment, implementation
Three Types of Structures
Correspond to the three broad types of decisions that
architectural design involves:
How is the system to be structured as a set of code units
(modules?)
How is the system to be structured as a set of elements that
have runtime behavior (components) and interactions
(connectors)?
How is the system to relate to non-software structures in its
environment (i.e., CPUs, file systems, networks, development
teams, etc. - allocation)?
29
Common software architecture structures
30
Non-functional Properties
Each structure provides a method for reasoning about some of
the relevant quality attributes, for example:
the uses structure, must be engineered to build a system that
can be easily extended or contracted
the process structure is engineered to eliminate deadlock and
reduce bottlenecks
the module decomposition structure is engineered to produce
modifiable systems, etc.
Each structure provides the architect with a different
view into the system & a different leverage point for
31 design.
Three Kinds of Structures
Module :
• Decomposition: units are related by “is a sub module of ”, larger modules are
composed of smaller ones
• Uses: relation is “uses” (calls, passes information to, etc).
• Layered: is special case of uses, layer n can only use modules from layers <n
• Class: generalization, relation “inherits from”
Component :
• Process: units are processes, connected by communication or synchronization
• Concurrency: to determine opportunities for parallelism (connector = logical
thread)
• Shared data: shows how data is produced and consumed
• Client-server: cooperating clients and servers
Allocation :
• Deployment: how software is assigned to hardware elements
• Implementation: how software is mapped onto file structures
• Work assignment: who is doing what
32
Useful module structures
Decomposition structure:
33
…Useful module structures
Uses structure:
34
…Useful module structures
Layer structure:
35
…Useful module structures
36
…Useful module structures
Data model:
37
…Useful module structures
38
Useful C&C structures
Service structure:
Units: services, ESB, registry
Relations: runs concurrently with,
may run concurrently with,
excludes, precedes, etc.
Used for: scheduling analysis,
performance analysis
Affected attributes include:
Interoperability, modifiability
39
…Useful C&C structures
40
…Useful C&C structures
C&C structures help answer questions:
What are the major executing components and how do they interact at runtime?
What are the major shared data stores?
Which parts of the system are replicated?
How does data progress through the system?
What parts of the system can run in parallel?
Can the system's structure change as it executes and, if so, how?
They are crucially important for reasoning about the system's
runtime properties such as performance, security, availability.
41
Useful allocation structures
Deployment structure:
42
…Useful allocation structures
Implementation structure:
Units: software elements
(usually modules), file structure
Relations: stored in
Used for: configuration control,
integration, test activities
Affected attributes include:
development efficiency
43
…Useful allocation structures
44
…Useful allocation structures
45
Relationship between structures
46
Relating Structures to Each Other
47
Choosing Structures
48
... Four + One Views
Development View – illustrates a system from a programmer's perspective and is
concerned with software management. This view is also known as the implementation
view. It uses the UML Component diagram to describe system components. UML
Diagrams used to represent the development view include the Package diagram
shows organization of software modules, libraries, subsystems, and units of
development. This is an allocation view.
Physical View – depicts the system from a system engineer's point of view. It is
concerned with the topology of software components on the physical layer as well as
the physical connections between these components. This view is also known as the
deployment view. UML diagrams used to represent the physical view include the
deployment diagram.
maps other elements onto processing & communication nodes, also an allocation view,
but usually referred to specifically as the deployment view.
49
... Four + One Views
Scenarios(One view)- The description of an architecture is
illustrated using a small set of use cases, or scenarios, which become
a fifth view.
The scenarios describe sequences of interactions between objects
and between processes.
They are used to identify architectural elements and to illustrate and
validate the architecture design. They also serve as a starting point
for tests of an architecture prototype.
This view is also known as the use case view.
50
... 4+1 Architectural View Model
51
... 4+1 Architectural View Model: Example
52