Академический Документы
Профессиональный Документы
Культура Документы
Software Architecture
in Practice
Paul C. Clements
Software Engineering Institute
Carnegie Mellon University
This material is approved for public release. Distribution is limited by the
Pittsburgh,
PA 15213-3890
Software Engineering Institute to attendees.
Sponsored
theDepartment
U.S. Department
Sponsored by by
the U.S.
of Defense of Defense
2002 byby
Carnegie
Mellon University
2002
Carnegie
Mellon University
Version 1.5
page 1
Version 1.5
page 2
Version 1.5
page 3
Version 1.5
page 4
And yet...
It is still not well understood in some circles.
Some organizations have no architect position. Others
have the position but it is informally defined.
Some organizations are still proceeding to development
without an architecture in place.
The tools of the trade -- styles and patterns, views,
evaluation -- are used sparingly if at all.
Version 1.5
page 5
Todays talk
What is software architecture and why is it important?
A benefit of architecture: Software product lines
Evaluating software architectures
Documenting software architectures
Version 1.5
page 6
Todays talk
What is software architecture and why is it important?
A benefit of architecture: Software product lines
Evaluating software architectures
Documenting software architectures
Version 1.5
page 7
Version 1.5
page 8
Version 1.5
page 9
Version 1.5
page 10
Version 1.5
page 11
Version 1.5
page 12
Extended
computer
module
Function
driver
module
Behavior-Hiding Module
Hardware-Hiding Module
Device
interface
module
Shared
services
module
Version 1.5
page 13
Device interfaces
values
to display
sensor inputs
Data banker
computed values
stored
values
calculated
real-world
values
Physical models
stored values
Shared services
sensor
values
computed values
Function drivers
Version 1.5
filtered
values
Filter behaviors
page 14
Layers View
Function drivers
Shared services
Data
banker
Physical
models
Filter
behaviors
Software
utilities
Device interfaces
Application data types
Extended computer
Version 1.5
page 15
Views -1
An architecture is a very complicated
construct -- too complicated to be seen all at once.
Views are a way to manage complexity.
1974: Parnas observed that software is composed of
many structures
1992: Perry and Wolf recognize that, similar to buildings
(with plumbing and electrical and wall diagrams), different
views of a system are required.
1995: Kruchten defined the 4+1 views approach to
software architecture.
2000: Hofmeister, Nord, and Soni defined the Siemens
Four Views approach to software.
2002 by Carnegie Mellon University
Version 1.5
page 16
Views -2
A view is a representation
of a set of architectural
elements and the
relations associated
with them.
All information
Version 1.5
page 17
Views -3
In box-and-line diagrams,
a way of asking what
the boxes and lines mean is:
What element types and relation types
are you showing?
In other words,
What view are you showing?
Which view shows the architecture?
None of them.
All of them.
2002 by Carnegie Mellon University
Version 1.5
page 18
Architecture As Communication
Vehicle
Architecture provides a common frame of reference in
which competing interests may be exposed and
negotiated.
negotiating requirements with users and other
stakeholders
keeping the customer informed of progress and cost
implementing management decisions and allocations
Version 1.5
page 19
Architecture Constrains
Implementation
An architecture defines constraints on an implementation.
Architectures are descriptive and prescriptive
- descriptive for communication
- prescriptive for design and implementation
Global resource allocation decisions constrain
implementations of individual components
System tradeoffs regarding quality attributes are in the
architectural realm.
Version 1.5
page 20
Version 1.5
page 21
Architecture Permits/Precludes
Achievement of Quality Attributes
For example
If you desire
performance
modifiability
security
scalability
ability to subset
reusability
Examine
inter-component communication
component responsibilities
inter-component communication,
specialized components (e. g., kernels)
localization of resources
inter-component usage
inter-component coupling
Version 1.5
page 22
Version 1.5
page 23
Version 1.5
page 24
Version 1.5
page 25
Todays talk
What is software architecture and why is it important?
A benefit of architecture: Software product lines
Evaluating software architectures
Documenting software architectures
Version 1.5
page 26
Version 1.5
page 27
Market strategy/
Application domain
is satisfied by
share an
Architecture
Products
used to structure
are built from
Components
CORE
ASSETS
Product lines
Version 1.5
page 28
earlier lifecycle
reuse
more
benefit
Version 1.5
page 29
in
production
Version 1.5
of a related
set of
products
page 30
Cumulative
Cost
Number of Products
Version 1.5
page 31
Version 1.5
page 32
Version 1.5
page 33
Version 1.5
page 34
Cummins Results
In early 1995, the first product was launched on time
(relative to re-vamped schedule) with high quality. Others
followed -- on time and with high quality.
Version 1.5
page 35
Quantitative Results - 1
20 product groups launched, which account for over
1000 separate engine applications
75% of all software, on average, comes from core assets
Product cycle time has plummeted. Time to first engine
start went from 250 person-months to a few personmonths. One prototype was built over a weekend.
Software quality is at an all-time high, which Cummins
attributes to product line approach.
2002 by Carnegie Mellon University
Version 1.5
page 36
Quantitative Results - 2
Customer satisfaction is high. Productivity gains
enable new features to be developed (more than 200
to date).
Projects are more successful. Before product line
approach, 3 of 10 were on track, 4 were failing, and 3
were on the edge. Now, 15 of 15 are on track.
Widespread feeling that developers are more
portable, and hence more valuable.
Version 1.5
page 37
Quantitative Results - 3
Supported
Components
Electronic control
modules (ECMs)
11
12
Fuel Systems
10
11
Engines
12
16
17
Features * ECM
60
80
180
370
Version 1.5
page 38
Quantitative Results - 4
Todays largest teams are smaller than yesterdays
smallest teams. Two-person teams are not unusual.
Cummins management has a history of embracing
change, but carefully targeted change.
They estimate that process improvement alone has
brought a benefit/cost ratio of 2:1 to 3:1.
They estimate that the product line approach has
brought a benefit/cost ratio of 10:1.
Product line approach let them quickly enter and then
dominate the industrial diesel engine market.
2002 by Carnegie Mellon University
Version 1.5
page 39
Lessons Learned
Cummins story echoes product line success
themes seen on other successful efforts, namely
a compelling business case
deep domain expertise
a rich legacy base
a dedicated champion
organizational cohesion
courage to try new engineering approaches
Version 1.5
page 40
Version 1.5
page 41
Version 1.5
page 42
Todays talk
What is software architecture and why is it important?
A benefit of architecture: Software product lines
Evaluating software architectures
Documenting software architectures
Version 1.5
page 43
Architecture Evaluation
A software architecture is the earliest life-cycle artifact that
embodies significant design decisions. Analyzing for system
qualities early in the life cycle allows for a comparison of
architectural options.
With the advent of cost-effective, repeatable architecture
evaluation methods, architecture evaluation should be a
standard part of every architecture-based development
methodology.
Version 1.5
page 44
Version 1.5
page 45
Version 1.5
page 46
Version 1.5
page 47
Validation of Requirements
Evaluations put stakeholders in the same room with each
other, often for the first time.
uncovers conflicts and tradeoffs
provides a forum for negotiated resolution of problems
It often results in the generation of new requirements or
the clarification of existing requirements.
Version 1.5
page 48
Improved Architectures
Development organizations anticipate types of questions
raised at evaluations and
design architectures with questions in mind
prepare documentation of the type needed at
evaluation
give explicit consideration to qualities to be evaluated
Version 1.5
page 49
The ATAMSM
The SEI has developed the Architecture
Tradeoff Analysis MethodSM (ATAMSM).
The purpose of ATAMSM is: to assess the
consequences of architectural decisions
in light of quality attribute requirements and
business goals.
Version 1.5
page 50
ATAMSM Steps
1. Present the ATAMSM
2. Present business drivers
3. Present architectural views
4. Identify architectural approaches
Phase 1:
Evaluation team,
key decision-makers
Version 1.5
Phase 2:
Evaluation team,
stakeholders
page 51
Quality
Attributes
Scenarios
Analysis
Software
Architecture
Architectural
Approaches
Architectural
Decisions
Tradeoffs
impacts
Sensitivity Points
Risk Themes
2002 by Carnegie Mellon University
distilled
into
Version 1.5
Non-Risks
Risks
page 52
Todays talk
What is software architecture and why is it important?
A benefit of architecture: Software product lines
Evaluating software architectures
Documenting software architectures
Version 1.5
page 53
Documenting an architecture
Architecture serves as the blueprint for the system, and the
project that develops it.
It defines the work assignments.
It is the primary carrier of quality attributes.
It is the best artifact for early analysis.
It is the key to post-deployment maintenance and mining.
Documenting the architecture is the crowning step to
creating it.
Documentation speaks for the architect, today and 20 years
from today.
2002 by Carnegie Mellon University
Version 1.5
page 54
Version 1.5
page 55
Version 1.5
page 56
Version 1.5
page 57
Version 1.5
page 58
Version 1.5
page 59
Version 1.5
page 60
How is it structured as a set of elements that have runtime behavior and interactions?
Version 1.5
page 61
Version 1.5
page 62
Version 1.5
page 63
How to proceed?
1. Build a table.
ROWS: Enumerate the stakeholders
COLUMNS: Enumerate the set of styles that could apply
to the architecture being documented. This is our potential
set of views.
Check box (x,y) if stakeholder x would like view y.
2. Combine views appropriately to reduce number.
3. Prioritize views based on need. (Some stakeholders may
have extra weight.)
2002 by Carnegie Mellon University
Version 1.5
page 64
Documenting a view -1
1. A primary presentation
Usually graphical (we call this a cartoon)
May be textual -- e.g., a table
If graphical, includes a key explaining the notation (or
pointing to explanation)
Shows elements and relationships among them
Shows information you wish to convey about the view
(view packet) first
Many times, the primary presentation is all you get. Its
not enough!
2002 by Carnegie Mellon University
Version 1.5
page 65
Documenting a view -2
2. An element catalog
Explains the elements depicted in the primary
presentation
Lists elements and their properties (as defined by the
relevant style guide)
Explains relations, and any exceptions or additions to
the relations shown in the primary presentatio
Interfaces of elements
3. A context diagram
Shows how system (or portion shown in this view
packet) relates to its environment.
2002 by Carnegie Mellon University
Version 1.5
page 66
Documenting a view -3
4. A variability guide
Shows the architectural mechanisms available to
change the element
5. Architecture background
Rationale for design decisions that apply to the entire
view (or to that portion of the view being shown),
including rejected alternatives and factors that
constrained the design
Analysis results validating the design decisions
Assumptions about the environment and about the
need that the system is fulfilling
2002 by Carnegie Mellon University
Version 1.5
page 67
Documenting a view -4
6. Other information
System- and project-specific.
CM information, ownership information
Mapping to requirements
Not architectural, strictly speaking. But useful to
capture alongside the architecture anyway.
7. Related view packets
Pointers to sibling, child, and parent view packets
Version 1.5
page 68
Version 1.5
page 69
Version 1.5
page 70
Version 1.5
page 71
Source of material - 1
General overview
2001
Version 1.5
page 72
Source of material - 2
Architecture evaluation
Architecture documentation
2001
2002
Version 1.5
page 73
Version 1.5
page 74