Lecture - 7
Lecture - 7
System Design:
Access Control
System Design
8. Boundary
1. Design Goals Conditions
Definition Initialization
Trade-offs Termination
Failure
2. Subsystem Decomposition 7. Software
Layers vs Partitions Control
Coherence/Coupling
Monolithic
Event-Driven
3. Concurrency Conc. Processes
Identification of 4. Hardware/ 5. Data 6. Global Resource
Threads Software Mapping Management Handlung
Special Purpose 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 ??!
Initial
Solution: Synchronization of Threads Single WithdrawCtrl
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
TCP/IP
Logical
Connectivity
Ethernet Cat 5
Physical
Connectivity
Logical vs Physical Connectivity and
the relationship to Subsystem
Layering
Processor 1 Processor 2
Hardware-Software Mapping
Difficulties
• Much of the difficulty of designing a system
comes from addressing externally-imposed
hardware and software constraints
• Certain tasks have to be at specific locations
• Example: Withdrawing money from an ATM
machine
• Some hardware components have to be used from a
specific manufacturer
• Example: To send DVB-T signals, the system has to
use components from a company that provides
DVB-T transmitters.
Hardware/Software Mappings in
UML
• A UML component is a building block of the system.
It is represented as a rectangle with a tabbed
rectangle symbol inside
• Components have different lifetimes:
• Some exist only at design time
• Classes, associations
• Others exist until compile time
• Source code, pointers
• Some exist at link or only at runtime
• Linkable libraries, executables, addresses
• The Hardware/Software Mapping addresses
dependencies and distribution issues of UML
components during system design.
Two New UML Diagram Types
• 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 :PC :Server
• Hardware/Software Mapping
• 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
• A UML interface describes a group of operations
used or created by UML components.
• There are two types of interfaces: provided and
required interfaces.
• A provided interface is modeled using the lollipop
notation
• A required interface is modeled using the socket
notation.
• A port specifies a distinct interaction point
between the component and its environment.
• Ports are depicted as small squares on the sides of
classifiers.
Component Diagram Example
Dependency.
reservations
UML
Component
update
UML Interface
Deployment Diagram Example
Dependency
UML Node (in a node)
UML
Interface
Dependency
(between nodes)
ARENA Deployment Diagram
System Design
8. Boundary
1. Design Goals Conditions
Definition Initialization
Trade-offs Termination
Failure
2. Subsystem Decomposition 7. Software
Layers vs Partitions Control
Coherence/Coupling
Monolithic
Event-Driven
3. Concurrency Conc. Processes
Identification of 4. Hardware/ 5. Data 6. Global Resource
Threads Software Mapping Management Handlung
Special Purpose Persistent Objects Access Control List
Buy vs Build Filesystem vs Database vs Capabilities
Allocation of Resources Security
Connectivity
5. Data Management
.
Better Access Matrix
Implementations
• Access control list
• Associates a list of (actor,operation) pairs with each
class to be accessed.
• Every time an instance of this class is accessed, the
access list is checked for the corresponding actor and
operation.
• Capability
• Associates a (class,operation) pair with an actor.
• A capability provides an actor to gain control access to
an object of the class described in the capability.
Access Matrix Example
Arena League Tournament Match
Player play()
forfeit()
Access Control List Realization
Access Control m1:Match
List for m1
I am joe,
I want to play in
match m1 joe may play
alice may play
joe:Player
Gatekeeper checks
identification against
list and allows access.
Capability Realization
m1:Match
Here’s my ticket, I’d
like to play in
match m1
joe:Player
Gatekeeper checks if
ticket is valid and
ke t for allows access.
Tic “ m1”
h
matc
Capability
Global Resource Questions
• 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
<<include>>
StartServer
Server <<include>>
Administrator
ManageServer ShutdownServer
<<include>>
ConfigureServer