More Architectural Design
Tom Kelliher, CS 319
Dec. 1, 2000
Meeting on 12/11 in HS 133 3:00-5:00pm. John responsible for hydration. Tom
responsible for frozen dairy confections. Will responsible for sentient... Oh,
never mind. Ed responsible?
Course evaluation Monday.
Read Chapter 14.
Architectural design.
- Control models.
- Modular decomposition.
- Domain Specific Architectures.
Object-oriented design.
Centralized and event-driven.
- One sub-system designated controller and has responsibility for managing
execution of other sub-systems.
- Two models:
- Call-Return model: Subroutines. Familiar programming language control.
Only applicable to sequential systems.
Applicable as a module control mechanism for controlling functions or
objects.
- Manager model: Sub-Systems are parallel processes. System manager
controls the start, stop, and coordination of other system processes.
Sequential variation: manager sequentially calls other sub-systems as
determined by global system state variables.
- Example:
Note: this does not imply anything regarding structure.
- Control is expected to return to where it came from.
- Advantages: relatively simple to analyze control flow and determine
response to inputs.
- Disadvantages: Exception handling is difficult. You either break the model
or introduce a lot of redundant error-checking code.
- Manager model example of a ``soft'' real-time system:
- Another example: telnetd.
- Driven by externally generated events rather than system state variables.
- An event is an abstract signal with a range of values. Its timing
is not controlled by the system.
- Examples: recalculation in a spreadsheet, rule-based expert systems,
dataflow processing, physical I/O in an operating system.
- Two models:
- Broadcast:
- Events are ``broadcast'' to all sub-systems. Any sub-systems designed
to handle that event respond. Useful in a distributed environment.
- Sub-Systems register an interest in events. When event occurs, event
handler dispatches event to sub-system(s). (This is the ``broadcast.'')
- Distinction between this and central control.
- Sub-System communication via messages possible.
- Advantages: Simple to evolve system by adding new sub-systems which
register their events. A sub-system can communicate with other sub-systems
without knowing their names. The distributed nature is transparent.
- Disadvantages: Not knowing if/when a particular event will be handled.
Not knowing how many responses will be generated.
How easy will it be to trace control sequences, consider that
sub-systems will be entering and registering their interests in events.
- Example:
- Interrupt-driven:
- Interrupt handler fields event and passes it off to the appropriate
sub-system. Used in real-time systems with hard deadlines.
- Key: quick response. Achieved by table of interrupt vectors.
- Example:
- Vehicle airbag controller. Space shuttle control surfaces.
- Advantages: Very quick event responses.
- Disadvantages: Programming complexity, difficulty in validation,
difficulty in replicating interrupt timing. Making changes if hardwares
limits the system to a small number of interrupts (unless interrupts are
shared, which then requires polling and slows response time).
Interrupt limitation example: the PC and the ISA bus. Solution: the PCI
bus.
Modules are smaller than sub-systems, allowing alternative decomposition
models. The previous models could still be used, though.
Defer the concurrency question as long as possible. Why?
- System is decomposed into a set of communicating objects. Loosely coupled
objects with well-defined interfaces.
- Invoice processing system example:
- A control model must be picked.
- Advantages: Loose coupling eases changes. Model of real-world increases
understanding. Object reuse.
- Disadvantages: Naming and knowledge of interface make changes to those
aspects difficult/impossible. Large, complex entities can be difficult to
model.
- System is decomposed into a set of functional filters. AKA pipeline
approach.
- Invoice processing system example:
Less abstract than object model, processing sequence specified.
- Sequential or parallel. Item-by-item or batch processing.
- Batch sequential model for data processing systems. Billing, etc.
- Advantages: Reuse. Intuitive, because of worker's in/out boxes. Adding new
transformations is simple. Implementation as either sequential or concurrent
system feasible.
- Disadvantages: Common data exchange format required. (Unix solution: file
model.) Difficulty in designing GUI interactive (events) systems.
- Generic models: Derived from a number of real systems. ``Bottom-Up.''
Capture principal characteristics. Describe a limited class of system.
- Reference architectures: More abstract, describing a larger class of
system. ``Top-Down.'' Not based upon real systems. Instead, reflect
application domain.
- A compiler as the classic example:
- Contrast with the repository model of a compiler.
- A standard which can be used to compare real systems. Introduces
terminology to an application domain.
- OSI reference model as the classic example:
- Intended to promote interconnection of conformant systems. A failure.
Layering subverted.
Thomas P. Kelliher
Fri Dec 1 13:28:22 EST 2000