9 System Design
9 System Design
15-413
Lecture Notes on
System Design
Bernd Bruegge
School of Computer Science
Carnegie Mellon University
Pittsburgh PA 15213
v Consistency problems:
w Different signatures by method provider and method user
v Completeness problems:
w Dangling associations (associations pointing to nowhere)
w Double defined classes
w Missing classes (imported by one module but not defined
anywhere)
v Ambiguity problems:
w Entities referred to in more than one of the models are not
identical
w Names are spelled differently in different models or within the
same model
w Classes in different subsystems have the same name but different
meanings
v Presentations
w Analysis Review: Oct 22 & 27, 9:00-10:20am
w System Design Review: Nov 11, 9:00-10:20am
w Object Design & Implementation Review: Nov 24
w Client Acceptance Test: Dec 10 (precise date to be announced)
v Speakers:
w 5-6 Speakers per Review
w 15-20 minute presentations
w Every student will have to give one presentation
w Scheduling and elicitation of speakers on the announce bboard
8 9 10 11 12 13 14
System Design
Design I Second Rev Patterns,
System Design II Team RADs Gamma, Ch. 1
SDD template due
15 16 17 18 19 20 21
Prototyping
RAD Integration RAD Review
Design
Due Presentation
Patterns II
Deadline
22 23 24 25 26 27 28
Analysis
Analysis Review
Review
SDD Due
29 30 31 1 2 3 4
Unit Testing
Database
Management Test Manual
Template Out
1. Design Goals
2. Subsystem decomposition
3. Identify concurrency
4. Allocate subsystems to processors
5. Specify management of data
6. Identify global resources and access methods
7. Define control
8. Define boundary conditions
System Architecture Patterns
System Design Template
Problem
v
the desired and available
systems in a manageable
way
Use Divide and Conquer
w We model the new system
?
Subsystem
Decomposition
to be developed as a set of
subsystems
v Layer relationship
w Layer A “Calls” Layer B (runtime)
w Layer A “Depends on” layer B (“make” dependency, compile
time)
v Partition relationship
w The subsystem have mutual but not deep knowledge about
each other
w Partition A “Calls” partition B and partition B “Calls” partition
A
C1
C1
attr attr
C1
attr
VM1
opr opr opr
C1 C1
attr attr VM2
opr opr
C1
C1
attr
attr VM3
opr
opr
C1
attr VM4
opr
Existing System
Bernd Bruegge 15-413 Software Engineering 28
Virtual Machine
v A virtual machine is a subsystem connected to higher
and lower level virtual machines by "provides services
for" associations.
C1
C1
attr
C1
VM1
attr attr
C1
C1
attr VM3
v Design Goal: High
attr
opr
opr
Maintainability C1
attr
C1
attr
VM4
opr opr
Efficiency
opr
C1 C1 VM4
attr attr
opr opr
v File Servers
w Client passes request for file over a network to the file server
w Useful for sharing files over a network
w Granularity supported by server:
u File
v Database Servers
w Client passes query to the server which finds the requested
data and send them back to the client
w Useful for decision support systems that require ad hoc queries
and flexible reports
w Granularity supported by server:
u Table, table entry
v Transaction Servers
w Clients sends a transaction ( a series of logically connected queries)
to the server which executes it locally, and sends the return result.
w If one of the queries fails, the transaction fails
w Useful for online reservation systems (airline, banking, ...)
w Granularity supported by server: Table, table entry
v Groupware Servers
w Client passes information (post, file, cursor movement) to server
which stores them in a repository and notifies other clients.
w Useful for communication over space and/or time
w Granularity supported by server:
u Depends on groupware product (Lotus Notes: Files, Posts).
v Object Servers
w Client invokes a remote method offered by a class residing on
a server
w Useful for heterogenous environments (multivendor,
multinetwork, multiplatform)
w Granularity supported by server:
u Objects
UI Application Data
Client Server
Data UI
UI Application
Application Data
Middle
Client Server
Ware
Middle
Client Server
Ware
Client
Event Service
Subscribe(Event JEvent)
UnSubscribe (Event JEvent)
Server Notify(Event JEvent)
UI
Authentication
Event Service
Network
Learning
Database
Learning
Authentication
Database
Network
PAID Services
Database
Interface
Object
Event Service
UI Interface
Interface Object
Object Authentication
Learning
Interface
Interface
Object
Object
Network
Interface
Object
Travel
SDD
VIP
Logbook
Vehicle
ODD
Maintenance
Ethernet
Communication
Agent for
Application Clients WAN Global
Data
Communication Server
Communication
Backbone Network Agent for Data
Agent for What is the problem OODBMS
Server
Application Clients
With this drawing?
Communication Global
Agent for Data Data
Server Server
TCP/IP RDBMS
Hardware Hardware
Bernd Bruegge 15-413 Software Engineering 65
Logical vs Physical Connectivity and the
relationship to Subsystem Layering
Processor 1 Processor 2
Bernd Bruegge 15-413 Software Engineering 66
Subsystem 1
Layer 1 Subsystem 2
Layer 2 Layer 1
Layer 3 Layer 2
Layer 4 Layer 3
Application Layer Application Layer
Hardware Hardware
Processor 1 Processor 2
Bernd Bruegge 15-413 Software Engineering 67
Another View at the ISO Model
Defines an object-oriented open software architecture
Each layer is a UML package containing a set of objects
Presentation Format
CORBA
Session Connection
Transport Message
DataLink Frame
Ethernet
TokenRing Physical Bit
u Event-driven control
–Control resides within a dispatcher who calls
subsystem functions via callbacks.
– Flexible, good for user interfaces
w Decentralized control
u Control resided in several independent objects
(supported by some languages).
u Possible speedup by parallelization, increased
communication overhead.
u Example: Message based system.
module1 module2
op1()
module3
op2()
op3()
v Smalltalk-80 Model-View-Controller
v Client/Server Architecture
Control
Update View3
Model has changed
Update Update
Model View2
View1
v Centralized Design
w One control object or subsystem ("spider") controls
everything
w Change in the control structure is very easy
w Possible performance bottleneck
v Decentralized Design
w Control is distributed
w Spreads out responsibility
w Fits nicely into object-oriented development
v Should PAID use a centralized or decentralized design?
v 9.2 Termination
w Are single subsystems allowed to terminate?
w Are other subsystems notified if a single subsystem terminates?
w How are local updates communicated to the database?
v 9.3 Failure
w How does the system behave when a node or communication link
fails? Are there backup communication links?
w How does the system recover from failure? Is this different from
initialization?
Bernd Bruegge 15-413 Software Engineering 80
Design Rationale
v The system design describes a solution based on existing
technology
w What issues were discussed?
w What other solutions have been considered? Why
were these not used?
w What is the reasoning behind the decisions made?
w What resolutions were made? Why?
w What kind of technological enablers were discussed
but not used? Did they influence your design?
v Lecture on November 10