Lecture 12 - Addressing Design Goals
Lecture 12 - Addressing Design Goals
8. Boundary
ü1. Design Goals Conditions
Definition Initialization
Trade-offs Termination
Failure
ü2. Subsystem Decomposition 7. Software
Layers vs Partitions
Coherence/Coupling Control
Monolithic
Event-Driven
Conc. Processes
Ø3. Concurrency
Identification of 4. Hardware/ 5. Data 6. Global Resource
Threads
Software Mapping
Special Purpose
Management Handlung
Persistent Objects Access Control List
Buy vs Build File system vs Database vs Capabilities
Allocation of Resources Security
Connectivity
Concurrency
withdraw(50)
getBalance()
setBalance(150)
setBalance(150)
Should BankAccount
be another Thread ?
Final
balance = 150 ??!
Single WithdrawCtrl Initial
Solution: Synchronization of Threads Instance balance = 200
:WithdrawCtrl :BankAccount
c1:Customer c2:Customer Synchronized method
withdraw(50)
getBalance()
withdraw(50)
200
computeNewBalance(200,50)
setBalance(150)
End
balance = 100
Concurrency Questions
8. Boundary
ü1. Design Goals Conditions
Definition Initialization
Trade-offs Termination
Failure
ü2. Subsystem Decomposition 7. Software
Layers vs Partitions
Coherence/Coupling Control
Monolithic
Event-Driven
Conc. Processes
ü3. Concurrency
Identification of Ø 4. Hardware/ 5. Data 6. Global Resource
Threads
Software Mapping
Special Purpose
Management Handlung
Persistent Objects Access Control List
Buy vs Build Filesystem vs Database vs Capabilities
Allocation of Resources Security
Connectivity
4. Hardware Software Mapping
• This system design activity addresses two questions:
– How shall we realize the subsystems: With hardware or with software?
– How do we map the object model onto the chosen hardware and/or
software?
• Mapping the Objects:
– Processor, Memory, Input/Output
• Mapping the Associations:
– Network connections
Mapping Objects onto Hardware
• Deployment Diagram:
– Illustrates the distribution of components at run-time.
– Deployment diagrams use nodes and connections to depict the
physical resources in the system.
• Component Diagram:
– Illustrates dependencies between components at design time,
compilation time and runtime
Deployment Diagram
• Deployment diagrams are useful for showing a system design after
these system design decisions have been made:
– Subsystem decomposition
– Concurrency
– Hardware/Software Mapping :PC :Server
• A deployment diagram is a graph of nodes and connections
(“communication associations”)
– Nodes are shown as 3-D boxes
– Connections between nodes are shown as solid lines
– Nodes may contain components
• Components can be connected by “lollipops” and “grabbers”
• Components may contain objects (indicating that the object is part of the
component).
UML Component Diagram
• Used to model the top-level view of the system design in terms of
components and dependencies among the components. Components
can be
• source code, linkable libraries, executables
• The dependencies (edges in the graph) are shown as dashed lines
with arrows from the client component to the supplier component:
– The lines are often also called connectors
– The types of dependencies are implementation language specific
• Informally also called “software wiring diagram“ because it show how
the software components are wired together in the overall application.
UML Interfaces: Lollipops and Sockets
reservations
UML
Component
update
UML Interface
Deployment Diagram Example
Dependency
UML Node (in a node)
UML
Interface
Dependency
(between nodes)
ARENA Deployment Diagram
5. Data Management
.
Better Access Matrix Implementations
– Centralized or decentralized
• Centralized control:
– Procedure-driven: Control resides within program code.
– Event-driven: Control resides within a dispatcher calling functions via
callbacks.
• Decentralized control
– Control resides in several independent objects.
• Examples: Message based system, RMI
– Possible speedup by mapping the objects on different processors,
increased communication overhead.
Software Control
Rule-based
Logic Programming
Control
Decentralized Centralized
Control Control
Event-based Procedural
Control Control.
Centralized vs. Decentralized Designs
• Centralized Design
– One control object or subsystem ("spider") controls everything
• Pro: Change in the control structure is very easy
• Con: The single control object is a possible performance bottleneck
• Decentralized Design
– Not a single object is in control, control is distributed; That means,
there is more than one control object
• Con: The responsibility is spread out
• Pro: Fits nicely into object-oriented development
Centralized vs. Decentralized Designs (2)
• Initialization
– The system is brought from a non-initialized state to steady-state
• Termination
– Resources are cleaned up and other systems are notified upon
termination
• Failure
– Possible failures: Bugs, errors, external problems
• Good system design foresees fatal failures and provides
mechanisms to deal with them.
Boundary Condition Questions
• Initialization
– What data need to be accessed at startup time?
– What services have to registered?
– What does the user interface do at start up time?
• Termination
– Are single subsystems allowed to terminate?
– Are subsystems notified if a single subsystem terminates?
– How are updates communicated to the database?
• Failure
– How does the system behave when a node or communication link
fails?
– How does the system recover from failure?.
Modeling Boundary Conditions