Lecture - 5
Lecture - 5
System Design:
Decomposing the System
Why is Design so Difficult?
Problem
• Bridge the gap
• between a problem and
an existing system in a
manageable way
System
• How? Design
• Use Divide & Conquer:
1) Identify design goals
2) Model the new system
design as a set of
subsystems
3-8) Address the major
design goals. Existing System
System Design: Eight Issues
System Design
8. Boundary
1. Identify Design Goals Conditions
Additional NFRs Initialization
Trade-offs Termination
Failure.
2. Subsystem Decomposition 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 vs Capabilities
Buy vs Build Filesystem vs Database Security
Network Connectivity
How the Analysis Models influence
System Design
• Nonfunctional Requirements
=> Definition of Design Goals
• Functional model
=> Subsystem Decomposition
• Object model
=> Hardware/Software Mapping, Persistent Data
Management
• Dynamic model
=> Identification of Concurrency, Global Resource
Handling, Software Control
• Finally: Hardware/Software Mapping
=> Boundary conditions
From Analysis to System Design
Nonfunctional Functional Model
Requirements
8. Boundary
1. Design Goals Conditions
Definition Initialization
Trade-offs Termination
Functional Model Failure
2. System Decomposition Dynamic
Layers vs Partitions Model
Coherence/Coupling 7. Software
Control
Monolithic
Dynamic Object Model Event-Driven
Model Conc. Processes
4. Hardware/ 5. Data
6. Global Resource
3. Concurrency Software Mapping Management
Handlung
Special Purpose Systems Persistent Objects
Identification of Access Control List
Buy vs Build Filesystem vs
Threads vs Capabilities
Allocation of Resources Database
Connectivity Security
Example of Design Goals
• Reliability Good documentation
• Modifiability Well-defined interfaces
• Maintainability User-friendliness
• Understandability Reuse of components
• Adaptability Rapid development
• Reusability Minimum number of errors
• Efficiency Readability
• Portability Ease of learning
• Traceability of requirements Ease of remembering
• Fault tolerance Ease of use
• Backward-compatibility Increased productivity
• Cost-effectiveness Low-cost
• Robustness Flexibility
• High-performance
Stakeholders have different Design
Goals
• Functionality v. Usability
• Cost v. Robustness
• Efficiency v. Portability
• Rapid development v. Functionality
• Cost v. Reusability
• Backward Compatibility v. Readability
Subsystem Decomposition
• Subsystem
• Collection of classes, associations, operations, events
and constraints that are closely interrelated with each
other
• The objects and classes from the object model are the
“seeds” for the subsystems
• In UML subsystems are modeled as packages
• Service
• A set of named operations that share a common purpose
• The origin (“seed”) for services are the use cases from
the functional model
• Services are defined during system design.
Example: Services
provided by the
User Interface ARENA Subsystems
Manages advertisement
banners & sponsorships Manages Administers user
tournaments,promotions, accounts
applications
Tournament
Advertisement User Management
Tournament
Session Statistics
Management Stores user profiles
Stores results of
Maintains state (contact info &
archived
during matches subscriptions)
tournaments
Subsystem Interfaces vs API
• Subsystem interface: Set of fully typed UML
operations
• Specifies the interaction and information flow from and
to subsystem boundaries, but not inside the subsystem
• Refinement of service, should be well-defined and small
• Subsystem interfaces are defined during object design
• Application programmer’s interface (API)
• The API is the specification of the subsystem interface in
a specific programming language
• APIs are defined during implementation
• The terms subsystem interface and API are often
confused with each other
• The term API should not be used during system design
and object design, but only during implementation.
Example: Notification subsystem
Partition Layer
relationship Relationship
A:Subsystem „depends on“ Layer 1
Tournament
Advertisement User Management
Component
Management
User Directory
Tournament
Session Statistics
Management
Example of a Bad Subsystem
Decomposition
User Interface
Component
Management
Advertisement Tournament
Tournament
Statistics
User Interface
Tournament
User
Management
Component
Advertisement Management
Tournament Session
Statistics Management
Virtual Machine 4 .
Virtual Machine 3
Virtual Machine 2
Virtual Machine 1
Virtual Machine4
Virtual Machine 3
Virtual Machine 2
Virtual Machine 1
C1 C1
Runtime efficiency C1 C1
attr attr VM4
op op
Properties of Layered Systems
• Layered systems are hierarchical. This is a
desirable design, because hierarchy reduces
complexity
• low coupling
• Closed architectures are more portable
• Open architectures are more efficient
• Layered systems often have a chicken-and egg
problem Symbol Table
A: Symbolic Debugger