Professional Documents
Culture Documents
ARCHITECTURAL
PATTERNS
Christopher Parnin
(slides from Dr. Eric Wohlstadter, Dr. Gail Murphy, and Dr. Emerson
This work is licensed under a Creative Commons
Attribution-Noncommercial 2.5 Canada License
Murphy-Hill
Learning Goals
You will be able to:
Identify an architecture when you see it
Pick an appropriate architecture for a problem
Compare and contrast architectural choices
Format:
Descriptions
Examples
Consequences
Stakeholder communication
Abstract enough to explain to non-experts
Security
Reduce access paths to critical resources
Safety
Localize safety critical operations in a single module
Availability/Replicability
Provide redundant access paths. Can duplicate components easily.
Maintainability
Reduce dependencies, make components self-contained
Often in conflict with ease of development
Architectural Patterns
An architectural pattern consists of:
a set of component types (e.g. process, procedure) that perform
some function at runtime
a topological layout of the components showing their runtime
relationships
a set of connectors (e.g. data streams, sockets) that mediate
communication among components
Where We At
Client
Client
Client
Blackboard Description
Analogy: a bunch of experts writing at a whiteboard, observing each
other, writing when their expertise is needed.
Knowledge sources (ks) independently change centralized
blackboard
Control is driven entirely by the state of the blackboard
Blackboard Example
eBay Auctions + eBay mobile for iPhone
(http://pages.ebay.com/mobile/iphone.html)
x
RADARSAT-1 is an earth-observing satellite that was launched
on November 4, 1995. It is used to collect weather and
environment-related data.
RADARSAT-1's mission control system performed operations
that included
(a) translating requests from commercial and
government users into detailed schedules for the spacecraft and
processing facilities
(b) producing and maintaining a schedule of activities for
the spacecraft and its different components; data-reception
stations; and data-processing facilities.
Countdown to Success:Dynamic Objects,GBB, and
RADARSAT-1" by Daniel D. Corkill
Blackboard Consequences
+ Good when solution is non-deterministic
+ When building a new knowledge-source,
notification of events makes implementation
easier
Requires complex infrastructure
Exercise
With the person next to you, give an example of an application where
blackboard would be appropriate, and another where a repository
would be appropriate
Where We At
from Sommerville
Object-Oriented Description
System is decomposed around data
Classes encapsulate data and provide services to
manipulate data
Classes provide well defined interfaces
Control determined by dynamic dispatch.
Object-Oriented Example
from Sommerville
Object-Oriented Consequences
+ Well defined interfaces
Implementation details are easy to change
Data formats can be abstracted by class interfaces
Exercise
1. Which architecture would be easier to replicate a central database?
a.repository
b.blackboard
2. Which of the following is a component of the blackboard pattern?
a. routine
b. sink
c. knowledge source
3. What type of architecture does the object-oriented pattern fall under?
a.data centered
b.call and return
Where We At
Pipe-And-Filter
Components (Filters)
Set of inputs and outputs
Local transformation
Connectors (Pipes)
Facilitate data flow
Constraints
Do not share state
Pipe-And-Filter
Specialization
Pipelines: restricted to linear order
Bounded pipes: restricts data flow size.
Typed pipes: only accept connections for acceptable
types of filters.
Pipe-And-Filter Example
Map Reduce
Where We At
Event Systems
Execution is controlled by events; a packet coming
in, a button being clicked, etc
Styles
EXPLICIT INVOCATION
IMPLICIT INVOCATION
CLIENT-SERVER
PEER-TO-PEER
Case Study
Tektronix wanted to develop software architecture
for oscilloscopes, which measure and display
traces of electronic signals.
Hybrid Architectures
Most systems are hybrid
Systems can be broken down into sub-systems with
different architectures at different levels of
abstraction
Wrap-Up
You should be able to:
Identify an architecture when you see it
Pick an appropriate architecture for a problem
Compare and contrast architectural choices