CH 3
CH 3
Subsystem Design
Objectives :
Understand the purpose of Subsystem Design and where in the
lifecycle it is performed
Define the behaviors specified in the subsystem's interfaces
in terms of collaborations of contained classes (mentioned in Use
Case Design)
Document internal structure of the subsystem
Determine the dependencies upon elements external to the
subsystem that may be needed to support the responsibilities of
the interface.
Overview
System Design I
0. Overview of System Design
1. Design Goals
2. Subsystem Decomposition
1. Design Goals
Definition
8. Boundary
Trade-offs
Conditions
Initialization
Termination
Failure
2. System
Decomposition
Layers/Partitions 7. Software
Cohesion/Coupling
Control
Monolithic
Event-Driven
3. Concurrency Threads
Identification of 4. Hardware/ 6. Global Conc. Processes
Threads Software 5. Data Resource Handling
Mapping Management
Access control
Special purpose Persistent Objects Security
Files
Buy or Build Trade-off Databases
Allocation Data structure
Connectivity
Requirements Analysis for System Design
Nonfunctional requirements =>
Activity 1: Design Goals Definition
Functional model =>
Activity 2: System decomposition (Selection of subsystems based on
functional requirements, cohesion, and coupling)
Object model =>
Activity 4: Hardware/software mapping
Activity 5: Persistent data management
Dynamic model =>
Activity 3: Concurrency
Activity 6: Global resource handling
Activity 7: Software control
Subsystem Decomposition
Activity 8: Boundary conditions
List of Design Goals
Reliability Good documentation
Modifiability Well-defined interfaces
Maintainability User-friendliness
Understandability Reuse of components
Adaptability Rapid development
Reusability
Minimum # of errors
Efficiency
Readability
Portability
Ease of learning
Traceability of requirements
Ease of remembering
Fault tolerance
Backward-compatibility Ease of use
Cost-effectiveness Increased productivity
Robustness Low-cost
High-performance Flexibility
How do we get the Design Goals?
Current Situation:
Computers must be used in the office
Why? Problem
What we want:
A computer that can be used in mobile situations.
Fixed Network
Connection
Location of
user does not
matter
Precise Input
Generalize Constraints using Technology
Enablers
Fixed Network
Dynamic Network
Connection
Location of
user does not
Location-based
matter
PreciseInput
Vague Input
A: Subsystem Layer 1
C1 C1
attr attr VM4
op op
C1 C1 C1
Any layer can invoke operations attr attr attr VM1
from any layers below
op op op
C1 C1
attr attr VM3
op op
C1 C1
attr attr VM4
op op
Properties of Layered Systems
* *
Client
requester provider service1()
service2()
…
serviceN()
requester
Peer
*
service1()
service2() *
… provider
serviceN()
1. updateData
application1:DBUser
database:DBMS
application2:DBUser
2. changeNotification
Architectural Style
ISO’s OSI Reference Application
Model
ISO = International Presentation
Standard
Organization
OSI = Open System
Level of abstraction
Session
Interconnection
Reference model
defines 7 layers of Transport
network protocols and
strict methods of Network
communication
between the layers.
Closed software DataLink
architecture
Physical
OSI model Packages and their Responsibility
The Physical layer represents the hardware interface to the net-work. It
allows to send() and receive bits over a channel.
The Datalink layer allows to send and receive frames without error using
the services from the Physical layer.
The Network layer is responsible for that the data are reliably transmitted
and routed within a network.
The Transport layer is responsible for reliably transmitting from end to
end. (This is the interface seen by Unix programmers when transmitting
over TCP/IP sockets)
The Session layer is responsible for initializing a connection, including
authentication.
The Presentation layer performs data transformation services, such as byte
swapping and encryption
The Application layer is the system you are designing (unless you build a
protocol stack). The application layer is often layered itself.
Another View at the ISO Model
• A closed software
Application
architecture
• Each layer is a Presentation Format
UML package
containing a set of Session Connection
objects
Transport Message
Network Packet
DataLink Frame
Physical Bit
Model/View/Controller
Subsystems are classified into 3 different types
Model subsystem: Responsible for application domain knowledge
View subsystem: Responsible for displaying application domain
objects to the user
Controller subsystem: Responsible for sequence of interactions with
the user and notifying views of changes in the model.
MVC is a special case of a repository architecture: What is this?
Model subsystem implements the central datastructure, the
Controller subsystem explicitly dictate the control flow
initiator
Controller
* 1 repository
Model
1 notifier
subscriber
View
*
Which interacts with the user?
Sequence of Events (Collaborations)
:FolderView
Repository Architectural Style (Blackboard
Architecture, Hearsay II Speech Recognition System)
What’s blackboard? Are all repository architectural styles mean blackboard?
Repository
Subsystem
createData()
setData()
getData()
searchData()
Examples of Repository Architectural Style
Compiler
SemanticAnalyzer
SyntacticAnalyzer
Optimizer
LexicalAnalyzer CodeGenerator
understanding system
SymbolTable
(“Blackboard ParseTree
architecture”)
Database Management
Systems SourceLevelDebugger SyntacticEditor
Modern Compilers
Subsystem Decomposition Example
Authoring
Augmented
Reality
Modeling Workflow
Inspection
Workorder Repair
Summary I
System Design
Reduces the gap between requirements and the (virtual) machine
Decomposes the overall system into manageable parts
Subsystem Decomposition
Results into a set of loosely dependent parts which make up the
system
Nonfunctional Requirements may give a clue for the
use of Design Patterns
Read the problem statement again
Use textual clues to identify design patterns
Problem
Existing System
Services and Subsystem Interfaces