objectives the key roles an architecture description plays in a software project. the key roles an...

21
Objectives Objectives The key roles an architecture description The key roles an architecture description plays in a software project. plays in a software project. The multiple architectural views that can be The multiple architectural views that can be used to specify different structural aspects used to specify different structural aspects of the system being built. of the system being built. The component and connector architecture of The component and connector architecture of a system, and how it can be expressed. a system, and how it can be expressed. Different styles that have been proposed for Different styles that have been proposed for component and connector view that can be component and connector view that can be used to design the architecture of the used to design the architecture of the proposed system. proposed system. How architecture of a system can be How architecture of a system can be evaluated. evaluated.

Post on 21-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

ObjectivesObjectives The key roles an architecture description plays in The key roles an architecture description plays in

a software project.a software project. The multiple architectural views that can be used The multiple architectural views that can be used

to specify different structural aspects of the to specify different structural aspects of the system being built.system being built.

The component and connector architecture of a The component and connector architecture of a system, and how it can be expressed.system, and how it can be expressed.

Different styles that have been proposed for Different styles that have been proposed for component and connector view that can be used component and connector view that can be used to design the architecture of the proposed to design the architecture of the proposed system.system.

How architecture of a system can be evaluated.How architecture of a system can be evaluated.

Software ArchitectureSoftware Architecture

What is it?What is it? “It is the structure or structures of the It is the structure or structures of the

system, which comprise software system, which comprise software elements, the externally visible elements, the externally visible properties of those elements, and the properties of those elements, and the relationships among themrelationships among them” [L. Bass, P. Clements, and Rick Kazman]

Concept is borrowed from civil Concept is borrowed from civil engineering.engineering.

Software ArchitectureSoftware Architecture

Architectural description : identify Architectural description : identify the different structures of a system.the different structures of a system.

Architectural description is important Architectural description is important as it facilitates:as it facilitates:• Understanding & communicationUnderstanding & communication• ReuseReuse• Construction & evolutionConstruction & evolution• AnalysisAnalysis

Architectural ViewsArchitectural Views

Architectural description is Architectural description is dependant on the viewer of the dependant on the viewer of the system.system.

Different views can be used to Different views can be used to describe different characteristics of describe different characteristics of the same system.the same system.

Architectural view describes the Architectural view describes the structure of a system that addresses structure of a system that addresses certain concern.certain concern.

Architectural ViewsArchitectural Views

Types:Types:• ModuleModule• Component & ConnectorComponent & Connector• AllocationAllocation

Different views can be interrelated to each Different views can be interrelated to each other.other.

E.g. a component uses multiple modules.E.g. a component uses multiple modules.

Although different views might be present, Although different views might be present, only only oneone of them will be the basis for of them will be the basis for other views.other views.

C&C ViewC&C View

The C&C structure is simply a graph, with The C&C structure is simply a graph, with components as components as nodesnodes and and connectorsconnectors as as edges. edges.

Components: perform functionality, store Components: perform functionality, store data.data.

Component has:Component has:• Type: describe the nature of component.Type: describe the nature of component.• Name: reflects its role in a system and Name: reflects its role in a system and

represent the identity of the component.represent the identity of the component.

C&C ViewC&C View

Component ExamplesComponent Examples

C&C ViewC&C View

Connectors: define the interaction Connectors: define the interaction between components.between components.• E.g. Procedure call, messages, E.g. Procedure call, messages,

broadcasting bus … etc.broadcasting bus … etc. Connector has:Connector has:

• Name: reflects the nature of interaction Name: reflects the nature of interaction supported.supported.

• Type: specify the mechanism of Type: specify the mechanism of interactioninteraction

• E.g. binary, n-way.E.g. binary, n-way.

Connectors ExampleConnectors Example

C&C ViewC&C View

ExampleExample

Suppose we have to design and build a Suppose we have to design and build a simple system for taking an on-line survey simple system for taking an on-line survey of students on a campus. There is a set of of students on a campus. There is a set of multiple-choice questions, and the multiple-choice questions, and the proposed system will provide the survey proposed system will provide the survey form to the student, who can fill and form to the student, who can fill and submit it on-line. We also want that when submit it on-line. We also want that when the user submits the form, he is also the user submits the form, he is also shown the current result of the survey, shown the current result of the survey, that is, what percentage of students so far that is, what percentage of students so far have filled which options for the different have filled which options for the different questions. questions. Describe the architecture of this Describe the architecture of this systemsystem..

ExampleExample

Architecture of the survey system

Web

ExampleExample

Web client: implies that student’s Web client: implies that student’s machine must have compatible IE machine must have compatible IE installed.installed.

HTTP connector: implies that the HTTP connector: implies that the client interacts with a server over the client interacts with a server over the internet.internet.

Arch. Styles for C&C ViewArch. Styles for C&C View

Software system have one or more Software system have one or more architectures.architectures.

Common architectures of software Common architectures of software systems are referred to as styles.systems are referred to as styles.

Architectural style: defines a family Architectural style: defines a family of architectures that satisfy the of architectures that satisfy the constraints of a style.constraints of a style.

Architectural StylesArchitectural Styles

Pipe & Filter:Pipe & Filter:• Component: filterComponent: filter• Connector: pipeConnector: pipe

flow: unidirectionalflow: unidirectional

• Functionality: manipulate transfer data.Functionality: manipulate transfer data.• Constraints:Constraints:

Filters are not aware of each others.Filters are not aware of each others.• Filters have independent threads.Filters have independent threads.

Pipe connect an output of one filter to an input of Pipe connect an output of one filter to an input of another filter.another filter.

• Useful in text processing applicationsUseful in text processing applications

Architectural StylesArchitectural Styles

Shared-Data:Shared-Data:• Components: Components:

data repository: database or filedata repository: database or file data acquire: obtain data, perform computation, data acquire: obtain data, perform computation,

return results back.return results back.

• Connector: Connector: Active and passive data acquisition protocols. Active and passive data acquisition protocols. Read/write protocols.Read/write protocols.

• Constraints: Constraints: no direct interaction between data acquiring no direct interaction between data acquiring

components.components.

• Useful in database applicationsUseful in database applications

Architectural StylesArchitectural Styles

Architectural StylesArchitectural Styles Client-Server:Client-Server:

• Components:Components: Client: initiates requests.Client: initiates requests. Server: handle and process requests and send reply.Server: handle and process requests and send reply.

• Connector:Connector: Synchronous Request/reply protocol.Synchronous Request/reply protocol.

• Constraints:Constraints: Clients can only communicate with server not other Clients can only communicate with server not other

clients.clients. Communication between C and S is initiated by Communication between C and S is initiated by

client.client.• Useful in an n-tiers structuresUseful in an n-tiers structures

E.g. 3-tiers system is composed of client-business- E.g. 3-tiers system is composed of client-business- database components.database components.

Architectural StylesArchitectural Styles

Publisher-Subscriber:Publisher-Subscriber:• Components:Components:

Publisher: notifies registered components about an Publisher: notifies registered components about an event.event.

Subscriber: register their details to receive updates.Subscriber: register their details to receive updates.

• Connector: Connector: Active data acquisition protocols. Active data acquisition protocols.

• Constraints:Constraints: Only subscriber components will receive notification.Only subscriber components will receive notification. Subscribers cannot interact with each others.Subscribers cannot interact with each others.

• Useful in user interface-based applicationsUseful in user interface-based applications

Architectural StylesArchitectural Styles

Peer-to-peer:Peer-to-peer:• Components: Components:

Objects or modules.Objects or modules.

• Connectors:Connectors: Method invocation protocols. Method invocation protocols.

• Constraints:Constraints: NoneNone

Documenting ArchitecturesDocumenting Architectures

Every description of system architecture Every description of system architecture must contain:must contain:• System and architecture contextSystem and architecture context

Context diagram, DFD, STD … etc.Context diagram, DFD, STD … etc.

• Description of architecture viewsDescription of architecture views• Across views documentationAcross views documentation

Element: interface (syntactic/semantic)Element: interface (syntactic/semantic) Architecture rational: tells why an architecture was Architecture rational: tells why an architecture was

done this way.done this way. Behavior: describes the functionality of an element.Behavior: describes the functionality of an element.

SummarySummary Architecture of a software system provides a very high-level Architecture of a software system provides a very high-level

view of the system in terms of parts of the system and how view of the system in terms of parts of the system and how they are related to form the whole system.they are related to form the whole system.

Depending on how the system is partitioned, we get a Depending on how the system is partitioned, we get a different architectural view of the system.different architectural view of the system.

Architecture facilitates development of a high-quality Architecture facilitates development of a high-quality system.system.

There are three main architectural views of a system—There are three main architectural views of a system—module, component and connector, and allocation.module, component and connector, and allocation.

C&C view is most common, and is often the centerpiece of C&C view is most common, and is often the centerpiece of the architecturethe architecture

description.description. There are some common styles for a C&C view which have There are some common styles for a C&C view which have

been found useful for creating this architecture view for a been found useful for creating this architecture view for a system.system.