Lecture 08 - System Design and Architecture - System Design
Lecture 08 - System Design and Architecture - System Design
System Design
Software Design and Architecture
8. Boundary
1. Identify Design Goals Conditions
Additional NFRs Initialization
Trade-offs Termination
Failure.
2. Subsystem Decomposition & Software Architecture 7. Software
Layers vs Partitions Control
Coherence & Coupling
Monolithic
Event-Driven
3. Identify Concurrency Conc. Processes
Identification of 4. Hardware/ 5. Persistent Data 6. Global Resource
Parallelism Software Mapping Management Handling
(Processes, Identification of Nodes Storing Persistent Access Control
Threads) Special Purpose Systems Objects ACL vs Capabilities
Buy vs Build Filesystem vs Database Security
Network Connectivity
Analysis Sources: Requirements and System Model
8. Boundary
1. Design Goals Conditions
Nonfunctional
Definition Functional Model
Initialization
Requirements
Trade-offs Termination
Failure
2. System Decomposition 7. Software
Functional Model
Layers vs Partitions Control
Coherence/Coupling
Monolithic
Event-Driven
3. Concurrency Dynamic
Conc. Processes
Identification of 4. Hardware/ 5. Data 6. Global Resource
Model
Dynamic
Threads Software Mapping Management Handlung
Special Purpose SystemsModel
Object Persistent Objects Access Control List
Model Buy vs Build Filesystem vs vs Capabilities
Allocation of Resources Database Security
Connectivity
Functional Models
• Functionality v. Usability
• Cost v. Robustness
• Efficiency v. Portability
• Rapid development v. Functionality
• Cost v. Reusability
• Backward Compatibility v. Readability
Software Design and Architecture
• When defining the subsystem to represent the product, also define one
or more interfaces to represent the product interfaces.
Modeling Subsystems
Design Subsystems are modeled using UML components. This construct
provides the following modeling capabilities:
– can group classes to define a larger granularity part of a system
– can separate the visible interfaces from internal implementation
– can have execution at run-time
Some other considerations are:
– Each Design Subsystem must be given a name and a short description.
– The responsibilities of the original analysis class should be transferred to the
newly-created subsystem, using the description of the subsystem to
document the responsibilities
• UML 2.0 also defines a stereotype for component named
<<subsystem>>.
• This is an issue for the software architect to decide (whether to
choose for example to label components that are composed of
components as <<subsystem>>).
Subsystem Dependency Restrictions
In order to ensure that subsystems are replaceable elements in the model,
a few rules need to be enforced:
• A subsystem should minimize exposing of its contents. Ideally no
element contained by a subsystem should have 'public' visibility,
and thus no element outside the subsystem depends on the existence of
a particular element inside the subsystem
• A subsystem should define its dependencies on subsystem
interfaces .
• In addition, a number of subsystems may share a set of interfaces or
class definitions in common, in which case those subsystems 'import' the
contents of the packages which contain the common elements.
Subsystem Dependency Restrictions
An example of Subsystem and Package dependencies is shown below:
• A specification should define its dependencies. These are the
interfaces and visible elements from other subsystems and packages
that must be available in all compliant realizations of the subsystem.
Coupling and Cohesion
• Goal: Reduction of complexity while change occurs
• Partition relationship
– The subsystems have mutual knowledge about each other
• A calls services in B; B calls services in A (Peer-to-Peer)
• UML convention:
– Runtime dependencies are associations with dashed lines
– Compile time dependencies are associations with solid lines.
Example of a Subsystem Decomposition
Partition Layer
relationship Relationship
A:Subsystem „depends on“ Layer 1
Symbol Table
A: Symbolic Debugger
• Questions to ask:
– Does one subsystem always call another one for a specific service?
• Yes: Consider moving them together into the same subystem.
– Which of the subsystems call each other for services?
• Can this be avoided by restructuring the subsystems or changing the
subsystem interface?
– Can the subsystems even be hierarchically ordered (in layers)?
How to achieve Low Coupling
• Questions to ask:
– Does the calling class really have to know any attributes of classes in
the lower layers?
– Is it possible that the calling class calls only operations of the lower
level classes?