Architectural Styles

Architectural Styles
SE 464 / ECE 452 / CS 446
Chang Hwan Peter Kim
[email protected]
Based on slides prepared by
Michał Antkiewicz
June 24, 2006
Problem #1
●
➔
➔
Assume that you are building a source code transformation toolkit.
The toolkit will contain components that can be configured to
perform specific sets of code transformations on source code. There
are 3 categories of components: parsers (e.g., for C, Ada, COBOL)
that can read in source code and produce internal program
representation, transformers (code formatters, code optimizers, etc.)
that work on the internal program representation, and pretty-printers
that can transform the internal program implementation back into
source code. Assume that the toolkit should be easily extensible with
new components and that the components can work incrementally on
streams of source code or internal representation. The user will work
with the configurations in a batch mode rather than interactively.
What architectural style would be most appropriate for this toolkit?
Why?
Give a sketch of the toolkit architecture.
Problem #1 Solution
●
A data-flow system. Data controls computation.
●
Pipes & Filters
●
Parsers, transformers and pretty-printers work on data
streams in an incremental fashion. Consume & produce.
●
Extensibility
●
Batch mode rather than interactive
Problem #2
●
Assume that you are building a television controller which
responds to signals from remote control unit.
➔
Which architectural style is most appropriate for the given system?
➔
Give a sketch of a sample architecture for each system.
➔
Discuss the reason for selecting a given style for each
system.
Problem #2 Solution
●
A control-loop system: process input in a continuous
loop
●
Select the handler based on input
●
State-machine maybe used for complex input/output
–
●
E.g. Button sequence on input (receiver) side or signal
sequence on output (actuator) side
Event-driven architectural style possible as well
Problem #3
●
Assume that you are building a voice recognition system (assume
that the system has to perform segmentation into phonems, syllable
creation, word creation, and dictionary lookup; assume that these
tasks cooperate on the recognition problem and there is no simple
algorithmic order for performing these tasks; also, the system
should be easy to extend with new algorithms).
➔
Which architectural style is most appropriate for the given system?
➔
Give a sketch of a sample architecture for each system.
➔
Discuss the reason for selecting a given style for each
system.
Problem #3 Solution
●
Blackboard architecture.
●
No algorithmic order + cooperative work required.
●
New components register with the blackboard for events.
●
Processes solve partial solutions. Solutions are stored in the
blackboard.
Problem #4
●
Assume that you are building an e-commerce system handling high
volumes of transactions per day from on-line customers.
➔
Which architectural style is most appropriate for the given system?
➔
Give a sketch of a sample architecture for each system.
➔
Discuss the reason for selecting a given style for each
system.
Problem #4 Solution
●
Multi-tier architecture.
●
Middle tier (business logic) allows for scalability.
●
Database layer easy to scale.
●
Clients easy to update.
Problem #5
●
Assume that you are building a development environment capable
of integrating a set of tools (e.g., compiler, editor, debugger, etc.)
produced by different vendors.
➔
Which architectural style is most appropriate for the given system?
➔
Give a sketch of a sample architecture for each system.
➔
Discuss the reason for selecting a given style for each
system.
Problem #5 Solution
●
Implicit invocation.
●
Full decoupling between sender and receiver
●
–
Reuse,
–
Maintenance.
New tools can subscribe.
Problem #6
●
Assume that you are building a software performing call
processing for telecom switching equipment.
➔
Which architectural style is most appropriate for the given system?
➔
Give a sketch of a sample architecture for each system.
➔
Discuss the reason for selecting a given style for each
system.
Problem #6 Solution
●
●
Interacting processes.
More accurate modeling of concurrency of the real
world.
●
Robustness.
●
Scalability.