21
  Architecture Styles  Architecture Styles

Arch Styles1-Notes [Compatibility Mode]

Embed Size (px)

Citation preview

Page 1: Arch Styles1-Notes [Compatibility Mode]

8/8/2019 Arch Styles1-Notes [Compatibility Mode]

http://slidepdf.com/reader/full/arch-styles1-notes-compatibility-mode 1/21

 

 Architecture Styles Architecture Styles

Page 2: Arch Styles1-Notes [Compatibility Mode]

8/8/2019 Arch Styles1-Notes [Compatibility Mode]

http://slidepdf.com/reader/full/arch-styles1-notes-compatibility-mode 2/21

Software ArchitectureSoftware Architecture Good software engineers make use of architecturalGood software engineers make use of architectural

principles when designing complex softwareprinciples when designing complex software

,, --

relationships among systems so that new systems canrelationships among systems so that new systems canbe built as variations on old systems.be built as variations on old systems.

Second, getting the right architecture is often crucial toSecond, getting the right architecture is often crucial tothe success of a software system design; the wrong onethe success of a software system design; the wrong one

can lead to disastrous results.can lead to disastrous results. Third, detailed understanding of software architecturesThird, detailed understanding of software architectures

allows the engineer to make principled choices amongallows the engineer to make principled choices amongdesi n alternatives.desi n alternatives.

Fourth, an architectural system representation is oftenFourth, an architectural system representation is oftenessential to the analysis and description of the high levelessential to the analysis and description of the high level

..

Page 3: Arch Styles1-Notes [Compatibility Mode]

8/8/2019 Arch Styles1-Notes [Compatibility Mode]

http://slidepdf.com/reader/full/arch-styles1-notes-compatibility-mode 3/21

Programming Languages toProgramming Languages to

 Abstract Data Types Abstract Data Types

If you get the data structures right thenIf you get the data structures right then

development be easier.development be easier. ea s o un ers an ng o s w s ruc ures,ea s o un ers an ng o s w s ruc ures,

specifications, language issues etc.specifications, language issues etc.

o ware rc ec ureo ware rc ec ure

Page 4: Arch Styles1-Notes [Compatibility Mode]

8/8/2019 Arch Styles1-Notes [Compatibility Mode]

http://slidepdf.com/reader/full/arch-styles1-notes-compatibility-mode 4/21

Common Architectural StylesCommon Architectural Styles Common Framework is required to understandCommon Framework is required to understand

differences between stylesdifferences between styles

Framework: A specific system is a collection of Framework: A specific system is a collection of components (computational) together with acomponents (computational) together with a

components (connectors).components (connectors). It is like a Graph.It is like a Graph. Nodes represent componentsNodes represent components

 Arcs represent connectors (interaction) Arcs represent connectors (interaction)

y e: e nes a am y o suc sys ems n ermsy e: e nes a am y o suc sys ems n ermsof a pattern of structural organization.of a pattern of structural organization.

 

Page 5: Arch Styles1-Notes [Compatibility Mode]

8/8/2019 Arch Styles1-Notes [Compatibility Mode]

http://slidepdf.com/reader/full/arch-styles1-notes-compatibility-mode 5/21

Questions to understand a StyleQuestions to understand a Style

 — — 

connectors, and constraints?connectors, and constraints? What is the underl in com utational model?What is the underl in com utational model?

What are the essential invariants of the style?What are the essential invariants of the style?

 

What are the advantages and disadvantages of What are the advantages and disadvantages of usin that st le?usin that st le?

What are some of the common specializations?What are some of the common specializations?

Page 6: Arch Styles1-Notes [Compatibility Mode]

8/8/2019 Arch Styles1-Notes [Compatibility Mode]

http://slidepdf.com/reader/full/arch-styles1-notes-compatibility-mode 6/21

Pipes and FiltersPipes and Filters Each component has a set of inputs and set of outputs.Each component has a set of inputs and set of outputs.

 

Connectors are pipesConnectors are pipes Examples: Compilers, Unix Shell ProgramsExamples: Compilers, Unix Shell Programs

Page 7: Arch Styles1-Notes [Compatibility Mode]

8/8/2019 Arch Styles1-Notes [Compatibility Mode]

http://slidepdf.com/reader/full/arch-styles1-notes-compatibility-mode 7/21

 Advantages Advantages First, they allow the designer to understand the overallFirst, they allow the designer to understand the overallinput/output behavior of a system as a simpleinput/output behavior of a system as a simple

..

Second, they support reuse: any two filters can beSecond, they support reuse: any two filters can behooked together, provided they agree on the data that ishooked together, provided they agree on the data that is

r w .r w .

Third, systems can be easily maintained and enhanced:Third, systems can be easily maintained and enhanced:

new filters can be added to existing systems and oldnew filters can be added to existing systems and oldfilters can be replaced by improved ones.filters can be replaced by improved ones.

Fourth, they permit certain kinds of specialized analysis,Fourth, they permit certain kinds of specialized analysis,such as throu h ut and deadlock anal sis.such as throu h ut and deadlock anal sis.

Finally, they naturally support concurrent execution.Finally, they naturally support concurrent execution.Each filter can be implemented as a separate task andEach filter can be implemented as a separate task and

Page 8: Arch Styles1-Notes [Compatibility Mode]

8/8/2019 Arch Styles1-Notes [Compatibility Mode]

http://slidepdf.com/reader/full/arch-styles1-notes-compatibility-mode 8/21

DisadvantagesDisadvantages First, pipe and filter systems often lead toFirst, pipe and filter systems often lead to

a batch or anization of rocessina batch or anization of rocessin

Not good at handling interactive operationsNot good at handling interactive operations Second the ma be ham ered b havinSecond the ma be ham ered b havin

to maintain correspondences between twoto maintain correspondences between two

separate, but related streamsseparate, but related streams Third, depending on the implementation,Third, depending on the implementation,

they may force a lowest commonthey may force a lowest common

denominator on data transmissiondenominator on data transmission Loss of performance, increased complexityLoss of performance, increased complexity

Page 9: Arch Styles1-Notes [Compatibility Mode]

8/8/2019 Arch Styles1-Notes [Compatibility Mode]

http://slidepdf.com/reader/full/arch-styles1-notes-compatibility-mode 9/21

Data Abstraction & OO OrganizationData Abstraction & OO Organization

Data representation and operations areData representation and operations areenca sulated in ob ect com onentsenca sulated in ob ect com onents

Objects interact through functions andObjects interact through functions androcedure calls.rocedure calls.

Page 10: Arch Styles1-Notes [Compatibility Mode]

8/8/2019 Arch Styles1-Notes [Compatibility Mode]

http://slidepdf.com/reader/full/arch-styles1-notes-compatibility-mode 10/21

 Advantages Advantages Because an object hides its representationBecause an object hides its representation

implementation without affecting thoseimplementation without affecting those

 Additionally, the bundling of a set of  Additionally, the bundling of a set of 

manipulate allows designers to decomposemanipulate allows designers to decompose

agents.agents.

Page 11: Arch Styles1-Notes [Compatibility Mode]

8/8/2019 Arch Styles1-Notes [Compatibility Mode]

http://slidepdf.com/reader/full/arch-styles1-notes-compatibility-mode 11/21

DisadvantagesDisadvantages The most significant is that in order forThe most significant is that in order for

procedure call) it must know the identityprocedure call) it must know the identity

Further there can be side effect problems:Further there can be side effect problems:,,

C's effects on B look like unexpected sideC's effects on B look like unexpected side

, ., .

Page 12: Arch Styles1-Notes [Compatibility Mode]

8/8/2019 Arch Styles1-Notes [Compatibility Mode]

http://slidepdf.com/reader/full/arch-styles1-notes-compatibility-mode 12/21

Event Based, Implicit invocationEvent Based, Implicit invocation Explicit invocationExplicit invocation

 

 Also called as: Reactive integration, Selective Also called as: Reactive integration, Selective

Example: Editors and variable monitorsExample: Editors and variable monitors’ ’  ..

Page 13: Arch Styles1-Notes [Compatibility Mode]

8/8/2019 Arch Styles1-Notes [Compatibility Mode]

http://slidepdf.com/reader/full/arch-styles1-notes-compatibility-mode 13/21

 Advantages and Disadvantages Advantages and Disadvantages  Advantages Advantages

Stron su ort for reuseStron su ort for reuse

Easy system evolutionEasy system evolution DisadvantagesDisadvantages

Relinquish control over the computation performed byRelinquish control over the computation performed by

the systemthe system  

Cannot rely on the order in which they are invoked.Cannot rely on the order in which they are invoked.

Don’t know when the invocation is completed.Don’t know when the invocation is completed.

Exchange of dataExchange of data

Page 14: Arch Styles1-Notes [Compatibility Mode]

8/8/2019 Arch Styles1-Notes [Compatibility Mode]

http://slidepdf.com/reader/full/arch-styles1-notes-compatibility-mode 14/21

Layered SystemsLayered Systems A layered system is organized A layered system is organized

Page 15: Arch Styles1-Notes [Compatibility Mode]

8/8/2019 Arch Styles1-Notes [Compatibility Mode]

http://slidepdf.com/reader/full/arch-styles1-notes-compatibility-mode 15/21

 Advanta es and Disadvanta es Advanta es and Disadvanta es Advantages

First the su ort desi n based on increasin

levels of abstraction. Second, they support enhancement.

hird, they support reuse.

Disadvantages Not all systems are easily structured in aNot all systems are easily structured in a

layered fashionlayered fashion Difficult to define system-independent layers

Page 16: Arch Styles1-Notes [Compatibility Mode]

8/8/2019 Arch Styles1-Notes [Compatibility Mode]

http://slidepdf.com/reader/full/arch-styles1-notes-compatibility-mode 16/21

RepositoriesRepositories Two kinds of components: a central data structure represents the current state, r

on the central data store. Traditional database: Types of transactions in an

nput stream o transact on tr gger se ect on oprocesses to execute.

 main trigger of selecting the processes toexecute

, ,Control Examples: Signal processing, such as speech and

Page 17: Arch Styles1-Notes [Compatibility Mode]

8/8/2019 Arch Styles1-Notes [Compatibility Mode]

http://slidepdf.com/reader/full/arch-styles1-notes-compatibility-mode 17/21

able Driven Interpretersable Driven Interpreters  A virtual machine is produced in s/w A virtual machine is produced in s/w Interpreter includesInterpreter includes

Psue oPsue o--program eing interpreteprogram eing interprete Interpretation engineInterpretation engine

 

Page 18: Arch Styles1-Notes [Compatibility Mode]

8/8/2019 Arch Styles1-Notes [Compatibility Mode]

http://slidepdf.com/reader/full/arch-styles1-notes-compatibility-mode 18/21

Other ArchitecturesOther Architectures Distributed processesDistributed processes For Multi Process SystemsFor Multi Process Systems

Exam les: Rin or Star To olo iesExam les: Rin or Star To olo ies Client ServerClient Server

Main program/subroutine organizationsMain program/subroutine organizations Mirrors programming language in which the system is writtenMirrors programming language in which the system is written

Domain specific s/w architecturesDomain specific s/w architectures Provide an organizational structure tailored to a family of Provide an organizational structure tailored to a family of 

applicationsapplications xamp es: av on cs, comman an contro , or ve c e managementxamp es: av on cs, comman an contro , or ve c e management

systems.systems.

State Transition systemsState Transition systems..

Process control systemsProcess control systems Systems intended to provide dynamic control of a physicalSystems intended to provide dynamic control of a physical

environmentenvironment

Page 19: Arch Styles1-Notes [Compatibility Mode]

8/8/2019 Arch Styles1-Notes [Compatibility Mode]

http://slidepdf.com/reader/full/arch-styles1-notes-compatibility-mode 19/21

Heterogeneous ArchitecturesHeterogeneous Architectures Most systems typically involve a combinations of Most systems typically involve a combinations of several stylesseveral styles

w y r ur yw y r ur y

HierarchyHierarchy Example: Unix pipelineExample: Unix pipeline

 A second way for styles to be combined is to A second way for styles to be combined is to

permit a single component to use a mixture of permit a single component to use a mixture of .. Example: Accessing dataExample: Accessing data

 A third way for styles to be combined is to A third way for styles to be combined is to

comp e e y e a ora e one eve o arc ec uracomp e e y e a ora e one eve o arc ec uradescription in a completely different architecturaldescription in a completely different architecturalstyle.style.

Page 20: Arch Styles1-Notes [Compatibility Mode]

8/8/2019 Arch Styles1-Notes [Compatibility Mode]

http://slidepdf.com/reader/full/arch-styles1-notes-compatibility-mode 20/21

Case StudiesCase Studies Key word in contextKey word in context

Main ro ram subroutine with shared dataMain ro ram subroutine with shared data

 Abstract data types Abstract data types Im licit InvocationIm licit Invocation

Pipes and filtersPipes and filters

Instrumentation softwareInstrumentation software OO styleOO style

Layered styleLayered style

Pipe and filter stylePipe and filter style

Modified pipe and filter styleModified pipe and filter style

Page 21: Arch Styles1-Notes [Compatibility Mode]

8/8/2019 Arch Styles1-Notes [Compatibility Mode]

http://slidepdf.com/reader/full/arch-styles1-notes-compatibility-mode 21/21

Case StudiesCase Studies CompilerCompiler

 

Traditional compiler model with shared dataTraditional compiler model with shared data