Architectural Styles SE 464 / ECE 452 / CS 446 Chang Hwan Peter Kim [email protected] Based on slides...

13
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

Transcript of Architectural Styles SE 464 / ECE 452 / CS 446 Chang Hwan Peter Kim [email protected] Based on slides...

Page 1: Architectural Styles SE 464 / ECE 452 / CS 446 Chang Hwan Peter Kim chpkim@gmail.com Based on slides prepared by Michał Antkiewicz June 24, 2006.

Architectural StylesArchitectural Styles

SE 464 / ECE 452 / CS 446Chang Hwan Peter Kim

[email protected]

Based on slides prepared by Michał Antkiewicz

June 24, 2006

Page 2: Architectural Styles SE 464 / ECE 452 / CS 446 Chang Hwan Peter Kim chpkim@gmail.com Based on slides prepared by Michał Antkiewicz June 24, 2006.

Problem #1Problem #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.

Page 3: Architectural Styles SE 464 / ECE 452 / CS 446 Chang Hwan Peter Kim chpkim@gmail.com Based on slides prepared by Michał Antkiewicz June 24, 2006.

Problem #1 SolutionProblem #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

Page 4: Architectural Styles SE 464 / ECE 452 / CS 446 Chang Hwan Peter Kim chpkim@gmail.com Based on slides prepared by Michał Antkiewicz June 24, 2006.

Problem #2Problem #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.

Page 5: Architectural Styles SE 464 / ECE 452 / CS 446 Chang Hwan Peter Kim chpkim@gmail.com Based on slides prepared by Michał Antkiewicz June 24, 2006.

Problem #2 SolutionProblem #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

Page 6: Architectural Styles SE 464 / ECE 452 / CS 446 Chang Hwan Peter Kim chpkim@gmail.com Based on slides prepared by Michał Antkiewicz June 24, 2006.

Problem #3Problem #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.

Page 7: Architectural Styles SE 464 / ECE 452 / CS 446 Chang Hwan Peter Kim chpkim@gmail.com Based on slides prepared by Michał Antkiewicz June 24, 2006.

Problem #3 SolutionProblem #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.

Page 8: Architectural Styles SE 464 / ECE 452 / CS 446 Chang Hwan Peter Kim chpkim@gmail.com Based on slides prepared by Michał Antkiewicz June 24, 2006.

Problem #4Problem #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.

Page 9: Architectural Styles SE 464 / ECE 452 / CS 446 Chang Hwan Peter Kim chpkim@gmail.com Based on slides prepared by Michał Antkiewicz June 24, 2006.

Problem #4 SolutionProblem #4 Solution

● Multi-tier architecture.● Middle tier (business logic) allows for scalability.● Database layer easy to scale.● Clients easy to update.

Page 10: Architectural Styles SE 464 / ECE 452 / CS 446 Chang Hwan Peter Kim chpkim@gmail.com Based on slides prepared by Michał Antkiewicz June 24, 2006.

Problem #5Problem #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.

Page 11: Architectural Styles SE 464 / ECE 452 / CS 446 Chang Hwan Peter Kim chpkim@gmail.com Based on slides prepared by Michał Antkiewicz June 24, 2006.

Problem #5 SolutionProblem #5 Solution

● Implicit invocation.● Full decoupling between sender and receiver

– Reuse,– Maintenance.

● New tools can subscribe.

Page 12: Architectural Styles SE 464 / ECE 452 / CS 446 Chang Hwan Peter Kim chpkim@gmail.com Based on slides prepared by Michał Antkiewicz June 24, 2006.

Problem #6Problem #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.

Page 13: Architectural Styles SE 464 / ECE 452 / CS 446 Chang Hwan Peter Kim chpkim@gmail.com Based on slides prepared by Michał Antkiewicz June 24, 2006.

Problem #6 SolutionProblem #6 Solution

● Interacting processes.● More accurate modeling of concurrency of the real

world.● Robustness.● Scalability.