architectural styles 2

25
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 R Professor CSE Dept SJEC Vamanjoor, Mangalore

Upload: dr-reeja-s-r

Post on 11-Apr-2017

160 views

Category:

Engineering


0 download

TRANSCRIPT

Page 1: Architectural styles   2

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

ARCHITECTURAL STYLES - 2

Layered systemsRepositoriesinterpreters

Page 3: Architectural styles   2

Layered Systems

Page 4: Architectural styles   2

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

Examples

Networking protocolsOperating System

Page 6: Architectural styles   2

Layered pattern - variant

Closed architecture Open architecture

Page 7: Architectural styles   2

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

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

REPOSITORIES

Page 10: Architectural styles   2

Repositories

Page 11: Architectural styles   2

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

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

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

Distance

Object Location

Visual Process

or

Motion Syste

m

Voice Synthesi

zer

Blackboard

Object Location

o1 L1o2 L2

Page 15: Architectural styles   2

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

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

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

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

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

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

INTERPRETERSSuitable for applications in which the most appropriate language or machine for executing the solution is not directly available

Page 22: Architectural styles   2

Interpreter

An interpreter takes a program written in one language and interprets it to another language

Page 23: Architectural styles   2

Interpreter

Page 24: Architectural styles   2

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

Interpreter Examples

Programming Language Compilers: Java, Smalltalk

Rule Based Systems: Prolog, Coral Scripting Languages: Awk, Perl