Anda di halaman 1dari 8

Data-flow

(1) Batch-sequential and


(2) Pipes-and-filters

QA: Modifiability, Reusability

(1) Batch-sequential

Tape Tape Tape Tape Page


Validate Sort Update Report

Tape

SE, Software Architecture, FAST-NU, ©2009 38


Data-flow/
(2) Pipes and filters
QA: Easy to understand, good
reuse, easy to maintain/enhance,
support concurrent execution,
encapsulation Express Briefly

Issues: Can lead to batch


processing, not good with
interactive processes, force lowest
common denominator*

(3) Sub-Style: Pipeline-batch sequential system▪


Pro:
Filters are independent units i.e. do not share state with other filters
Filters do not know the identity of their upstream and downstream
neighbors
simple composition; easy to (re)use.
Contra: Lead to batch organization of processing (thinking);
incremental updates are not possible (incremental compiler). e.g. Unix
shell systems SE, Software Architecture, FAST-NU, ©2009 39
Data-Centered Style (1)

Goals/Quality Attributes (QA)/Issues


ƒ Data integrability
ƒ scalability (clients are independent; new clients/data
easily added)
ƒ Reuse, evolution, concurrent execution
Issues
ƒ Complex distributed computation, ordering
Examples
ƒ passive data store: repository style
ƒ active data store: blackboard style▪

SE, Software Architecture, FAST-NU, ©2009 40


Data-Centered Style

Repository style (passive)

Client Client Client

Shared data

Client Client Client

Note: clients are independently executing processes (i.e. independent-


component). Thus, styles are not rigidly separated from one another.

SE, Software Architecture, FAST-NU, ©2009 41


Data-Centered Style
Blackboard (active)

Client Client Client

Shared data

Client Client Client

SE, Software Architecture, FAST-NU, ©2009 42


Blackboard (2)
Knowledge sources: independent knowledge source
Blackboard data structure: state data; lead incrementally to the
solution
Control: driven by the data (state) of the blackboard
Examples: Intelligent Agents (possibly distributed) speech and
pattern recognition

Is anything wrong with this diagram


KS1
Non standard notations
KS3 KS2
Process?
Blackboard? Blackboard
Interaction? Shared Data
KS5
KS4

KS6 KS7

SE, Software Architecture, FAST-NU, ©2009 43


Virtual Machine Style (1)
ƒ Goal: simulate non-native functionality for
portability or prototyping
ƒ QA: Portability
ƒ Examples (Sub Styles)
ƒ interpreters
ƒ rule-based systems
ƒ command language processors

SE, Software Architecture, FAST-NU, ©2009 44


Interpreter Virtual Machine Style

inputs Data Program being


(program state) interpreted

State data
Data Updates Program
instructions

outputs Simulated Selected instruction Internal interpreter


Interpretation Selected data State (PC, regs)
engine

Merits: Easy implementation; flexibility through the ability to


interrupt and query the program and introduce runtime
modifications.
Demerits: Poor performance Java Virtual Machine

SE, Software Architecture, FAST-NU, ©2009 45

Anda mungkin juga menyukai