Architectural styles 2
-
Upload
dr-reeja-s-r -
Category
Engineering
-
view
165 -
download
0
Transcript of Architectural styles 2
![Page 1: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/1.jpg)
ARCHITECTURAL STYLES - 2
An architectural style defines a family of Systems in terms of a pattern of structural Organization. It determines:
– The vocabulary of components and connectors– A set of constraints on how they can be combined.
Dr Reeja S RProfessorCSE DeptSJEC Vamanjoor, Mangalore
![Page 2: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/2.jpg)
ARCHITECTURAL STYLES - 2
Layered systemsRepositoriesinterpreters
![Page 3: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/3.jpg)
Layered Systems
![Page 4: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/4.jpg)
Layered Systems
Components – layers Connectors – procedure calls
Each layer acts as a Server: service provider to layer “above” Client: service consumer of the layer “below”
![Page 5: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/5.jpg)
Examples
Networking protocolsOperating System
![Page 6: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/6.jpg)
Layered pattern - variant
Closed architecture Open architecture
![Page 7: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/7.jpg)
Advantages
Support design based on increasing levels of
abstraction – thereby partitioning a complex problem into a sequence of incremental steps
Supports enhancement since changes to one layer affects at the most 2 adjacent layer
Supports reuse - since different implementations (with identical interfaces) of the same layer can be used interchangeably
![Page 8: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/8.jpg)
Disadvantages
All systems cannot be structured in a layered fashion
It is quite difficult to get the right level of
abstraction.
The system may suffer lower performance
![Page 9: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/9.jpg)
REPOSITORIES
![Page 10: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/10.jpg)
Repositories
![Page 11: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/11.jpg)
Repositories Architectural Style
Components A central data structure representing the current
state of the system. A collection of independent components that operate
on the central data structure.
Connectors Procedure calls or direct memory accesses.
![Page 12: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/12.jpg)
Variants
1. Type of transactions in an input stream trigger selection of process to execute
2. Current state of the central data structure is the main trigger for selecting processes to execute.
Ex: Blackboard
![Page 13: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/13.jpg)
BlackboardTypically used for AI systems and in applications requiring
complex interpretations of signal processing, such as speech and pattern recognition.
![Page 14: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/14.jpg)
Distance
Object Location
…
Visual Process
or
Motion Syste
m
Voice Synthesi
zer
Blackboard
Object Location
…
o1 L1o2 L2
![Page 15: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/15.jpg)
Distance
Object Location
…
o1 L1o2 L2
10
Visual Process
or
Motion Syste
m
Voice Synthesi
zer
Blackboard
If(dist >=3)
![Page 16: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/16.jpg)
Distance
Object Location
…
o1 L1o2 L2
8
Visual Process
or
Motion Syste
m
Voice Synthesi
zer
Blackboard
If(dist >=3)
![Page 17: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/17.jpg)
Distance
Object Location
…
o1 L1o2 L2
6
Visual Process
or
Motion Syste
m
Voice Synthesi
zer
Blackboard
If(dist >=3)
![Page 18: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/18.jpg)
Distance
Object Location
…
o1 L1o2 L2
4
Visual Process
or
Motion Syste
m
Voice Synthesi
zer
Blackboard
If(dist >=3)
![Page 19: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/19.jpg)
Distance
Object Location
…
o1 L1o2 L2
2
Visual Process
or
Motion Syste
m
Voice Synthesi
zer
Blackboard
If(dist < 3)
![Page 20: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/20.jpg)
Repositories Advantages
Efficient way to store large amounts of data. Centralized management for backup, security and
concurrency control
Disadvantages Must agree on a data model a priori. Data evolution is expensive
![Page 21: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/21.jpg)
INTERPRETERSSuitable for applications in which the most appropriate language or machine for executing the solution is not directly available
![Page 22: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/22.jpg)
Interpreter
An interpreter takes a program written in one language and interprets it to another language
![Page 23: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/23.jpg)
Interpreter
![Page 24: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/24.jpg)
Interpreter
An interpreter has 4 Components: “Program” being executed and its data Interpretation engine and its state
Connectors procedure calls and shared state.
![Page 25: Architectural styles 2](https://reader036.fdocuments.net/reader036/viewer/2022070523/58ecec851a28abcb4d8b46cb/html5/thumbnails/25.jpg)
Interpreter Examples
Programming Language Compilers: Java, Smalltalk
Rule Based Systems: Prolog, Coral Scripting Languages: Awk, Perl