+ All Categories
Home > Documents > Software Architecture

Software Architecture

Date post: 13-Mar-2016
Category:
Upload: vanna-rodgers
View: 72 times
Download: 1 times
Share this document with a friend
Description:
Software Architecture. School of Computer Science & Engineering • School of Software , UESTC Jianchuan Xing E-mail : [email protected]. Chapter 5 Module Architecture View. Outline. 5.1 Design Activities for the Module Architecture View - PowerPoint PPT Presentation
Popular Tags:
52
22/6/16 Software Architecture 1/52 School of Computer Science & Engin eering • School of Software, UESTC Jianchuan Xing E-mail [email protected] Software Architecture
Transcript
Page 1: Software Architecture

23/4/24 Software Architecture 1/52

School of Computer Science & Engineering • School of Software, UESTC

Jianchuan Xing

E-mail: [email protected]

Software Architecture

Page 2: Software Architecture

23/4/24 Software Architecture 2/52

Chapter 5

Module Architecture View

Page 3: Software Architecture

23/4/24 Software Architecture 3/52

Outline 5.1 Design Activities for the Module

Architecture View

5.2 Design of Module Architecture View for IS2000

5.3 Summary of Module Architecture View

Page 4: Software Architecture

23/4/24 Software Architecture 4/52

5.1 Design Activities for the Module Architecture View

Figure 5.1 shows the design tasks for the module architecture view, and how they interact with other design tasks. Like the conceptual view, the module view has three basic phases: global analysis, central design tasks, and interface design.

The middle phase consists of three tightly coupled design tasks: modules, layers, and global evaluation.

Page 5: Software Architecture

23/4/24 Software Architecture 5/52

5.1 Design Activities for the Module Architecture View

(Cont.) This central phase uses the issue cards from global

analysis, and components, connectors, and configuration from the conceptual view as input. The results of this phase – the modules, subsystems, and layers – are used during interface design, and by the central design tasks of the execution and code architecture view.

During the central design phase you may identify new factors, issues, or strategies, causing you to revisit the global analysis task. You may also discover constraints about the modules or layers that cause you make changes to the conceptual view.

Page 6: Software Architecture

23/4/24 Software Architecture 6/52

5.1 Design Activities for the Module Architecture View

(Cont.) After the central design phase, you may also get

feedback from the interface design task, or from the execution or code architecture views, causing you to adjust the modules or layers.

Page 7: Software Architecture

23/4/24 Software Architecture 7/52

5.1 Design Activities for the Module Architecture View

(Cont.)Central Design Tasks

GlobalAnal ysi s

CentralDesi gnTasks

feedbackfeedforward

Conceptual Vi ew

Module Vi ew

Code View

Executi onView

Modules

modules l ayers

Globaleval uati on

Central Design Tasks

Interfacedesi gn

Final Desi gnTask

Issue Cards

New factors,i ssues,

strategies

Mudules,Subsystems,

Layers

Interfaceconstrains

New modul e parti ti oning

Components, Connectors,Confi gurati on

Modulesconstraints

Central Design Tasks

Mudules,Subsystems,

Layers

New modul e parti ti oni ng

Figure 5.1. Design tasks of the module architecture view

Page 8: Software Architecture

23/4/24 Software Architecture 8/52

5.1.1 Global Analysis The first design task for the module view is global

analysis. You have done much of the global analysis already, during the design of the conceptual view. When designing the module view, you may identify new factors or may create new issues and strategies, and the analysis of these follows the same approach described in Chapter 3, Global Analysis.

Before starting the central design tasks you should identify the strategies you expect to be relevant for the module view. Although you should check all the factors, certain categories are more likely to be relevant to this view.

Page 9: Software Architecture

23/4/24 Software Architecture 9/52

5.1.1 Global Analysis (Cont.) Once you’ve identified the relevant factors, you

then determine which strategies are influenced by them. Look for strategies related to modifiability, portability, and reuse. Use these strategies to guide the decisions for the module view. Also look for strategies related to properties like performance, dependability, and failure detection, reporting, recovery to make sure your module view design supports them.

Page 10: Software Architecture

23/4/24 Software Architecture 10/52

5.1.2 Central Design Tasks For the central design tasks you map conceptual

elements to subsystems and modules, create layers, and assign modules to layers. You also determine the interfaces of the modules and layers. Guiding these decisions are the strategies form global analysis, experience with prior products, and general software engineering knowledge.

Modules Layers Global Evaluation

Page 11: Software Architecture

23/4/24 Software Architecture 11/52

5.1.2 Central Design Tasks (Cont.)

Modules To design the modules you map the elements from

the conceptual view to subsystems and modules. A subsystem usually corresponds to a higher level conceptual component (one that is decomposed into other components and connectors). It can contain other subsystems or modules.

Page 12: Software Architecture

23/4/24 Software Architecture 12/52

5.1.2 Central Design Tasks (Cont.)

Layers Layers organize the modules into a partially

ordered hierarchy. When a module is assigned to a layer, it can use any of the other modules in that layer. But whenever a module usage crosses a later boundary, the interface required and provided by the modules must also be required and provided by the layers. Thus layers are used to constrain the module “use” relations.

Page 13: Software Architecture

23/4/24 Software Architecture 13/52

5.1.2 Central Design Tasks (Cont.)

Figure 5.2. Meta-model for subsystems and modules

Subsystem

Module

Interface

0..1 0..1

*

*

cont

ain

cont

ain

*

0..1**

use

**

**

provide

require

{Module A uses module Bwhen A requires aninterface that B provides.}

Page 14: Software Architecture

23/4/24 Software Architecture 14/52

5.1.2 Central Design Tasks (Cont.)

Figure 5.3. Meta-model for layers

LayerModule

Interface

0..1

cont

ain

*

0..1*

*

use

**

provide

require **

* Assigned to

{Layer A uses layer Bwhen A requires aninterface that B provides.}

Page 15: Software Architecture

23/4/24 Software Architecture 15/52

5.1.2 Central Design Tasks (Cont.)

Global Evaluation1. To define the modules and layers, you get guidance from

multiple sources: your conceptual view design, the strategies from global analysis, your experience with software architectures, and your general knowledge of architecture and software engineering. An important part of global evaluation is deciding which source of information to use at which time.

2. Global evaluation also means being on the lookout for feedback to the tasks and decisions you made earlier in the design. You should look for additional factors, issues, and strategies that feed back to global analysis task. You need to evaluate whether any of your decisions about modules and layers warrant a change to the design of the conceptual view.

Page 16: Software Architecture

23/4/24 Software Architecture 16/52

5.1.2 Central Design Tasks (Cont.)

3. The third aspect of global evaluation is evaluating your module view decisions with respect to each other. You should expect to adjust the modules and subsystems based on your decisions about the layers, and vice versa. You will have to define new interfaces or revise them to satisfy the “require” and “provide” relations of both modules and layers.

Page 17: Software Architecture

23/4/24 Software Architecture 17/52

5.1.3 Final Design Task: Interface Design

The final phase of module view design is to describe the interfaces for each of the modules and layers identified during the central design phase. This is done after the other tasks are complete. Here you do the detailed design of interfaces required or provided by modules or layers based on their use-dependencies. For this task you may decide to create new interfaces or to split or combine some. These decisions feed back to the central design tasks, and you may need to revise your modules or layers as a result.

Page 18: Software Architecture

23/4/24 Software Architecture 18/52

5.2 Design of Module Architecture View for IS2000 Now that we have introduced the tasks for the

module view design, let’s look at how these are applied to the example system.

Page 19: Software Architecture

23/4/24 Software Architecture 19/52

5.2.1 Global Analysis

We expect the following strategies to be applicable to the module view:

Issue: Aggressive Schedule Strategy: Reuse existing components.

Issue: Skill Deficiencies Strategy: Encapsulate multiprocess support facilities.

Issue: Changes in General-Purpose and Domain-Specific Hardware

Strategy 1: Encapsulate domain-specific hardware. Strategy 2: Encapsulate general-purpose hardware.

Page 20: Software Architecture

23/4/24 Software Architecture 20/52

5.2.1 Global Analysis (Cont.)

Issue: Changes in Software Technology Strategy 1: Use standards. Strategy 2: Develop product-specific interfaces to externa

l components. Issue: Real-Time Acquisition Performance

Strategy: Separate time-critical from nontime-critical components.

Issue: Implementation of Diagnostics Strategy 1: Reduce the effort for error handling Strategy 2: Encapsulate diagnostics components.

Page 21: Software Architecture

23/4/24 Software Architecture 21/52

5.2.2 Central Design Tasks: Modularization and Layering

Initial Definition of Layers The GUI layer implements the graphical user interface for

applications. Architecturally, a separate GUI layer is desirable for four reasons:

1. Design of GUI components is distinctly different from design of components with a programmatic application programming interface (API).

2. A separate GUI layer helps to promote a single, unified user interface design and reusable widgets for implementation.

3. Procedural and GUI components are enabled to be reused in other contexts.

4. Separation and decoupling of procedural and data components from GUI components reduces reworking resulting from changes to GUIs.

Page 22: Software Architecture

23/4/24 Software Architecture 22/52

5.2.2 Central Design Tasks: Modularization and Layering

(Cont.)

Figure 5.4. Initial creation of layers based on conceptual components. GUI=graphical user interface.

:Acqui re :Moni tor(GUI part)

:Export(GUI part)

<<l ayer>>GUI

:Acqui si ti onManagement

:PostProcessing

:Export(App part)

:Moni tor(App part)

:ImageCol l ecti on

<<l ayer>>Appl i cati on

:ImageProcessing

<<l ayer>>ImageProcessing

:ProbeControl

:DataCol l ecti on

<<l ayer>>ProbeServi ce

:Comm

<<l ayer>>SystemServi ces

Page 23: Software Architecture

23/4/24 Software Architecture 23/52

5.2.2 Central Design Tasks: Modularization and Layering

(Cont.)

Defining Modules for Image Processing As defined in the conceptual view, image processing consists of a

packetizer for collecting the raw data and one or more image pipelines that process the packets into images.

An image pipeline is composed of a sequence of stages: The “packetized” data is input to the first stage, and each stage’s output is input to the next stage. The output of the final stage is framed images.

For defining modules, let’s start by assigning each component to a single module. In general we want to separate as much of the communication infrastructure as feasible into connector- and port-specific modules. Then the modules implementing a conceptual component are insulated from changes to the software platform.

Page 24: Software Architecture

23/4/24 Software Architecture 24/52

5.2.2 Central Design Tasks: Modularization and Layering

(Cont.)

Figure 5.5. Conceptual configuration for ImageProcessing (from the conceptual view)

PipelineMgr

Eve

nt

acqControl

acqControl

Clie

nt/S

erve

r

pipelinestages

sender sender

receiver receiver

Framer

pack

etIn

packetOut

ImagePipe1..*

{or}Imager

Clie

nt/S

erve

r

source dest

imageIn

Imag

eOut

{or}

1..*stageControl

rece

iver

send

er

1..*

*

ImagePipeline

pack

etIn

fram

edO

utpu

t

pipelineControl stageControl

Packetizer PacketPipe

raw

Dat

a In

put

packetOut

destsource

acqControl

*

*raw

Dat

aInp

ut

ImageProcessing

fram

edO

utpu

t

Page 25: Software Architecture

23/4/24 Software Architecture 25/52

5.2.2 Central Design Tasks: Modularization and Layering

(Cont.)

Table 5.1. Mapping Conceptual Elements to Module Elements: ImageProcessing

Conceptual Element Module ElementName Kind Name KindImageProcessing Component SImaging SubsystemImagePipeline Component SPipeline SubsystemPacketizerpacketOutPacketPipe,Source,dest

ComponentPortConnectorRoles

MPacketizer Module

packetIn Port MPacketMgr ModuleacqControl Port MAcqControl Module

Page 26: Software Architecture

23/4/24 Software Architecture 26/52

5.2.2 Central Design Tasks: Modularization and Layering

(Cont.)

Table 5.2. Mapping Conceptual Elements to Module Elements: ImagePipeline

Conceptual Element Module ElementName Kind Name KindPipelineMgrpipeline, stagesImagePipeSource, destClient/Server,sender, receiverEvent,sender, receiver

ComponentPortsConnector and RolesConnector and rolesConnector and roles

MPipelineMgr Module

pipelineControl,stageControl,imageIn, imageOut

Ports MImageMgr Module

Framer Component MFramer ModuleImager Component MImager Module

Page 27: Software Architecture

23/4/24 Software Architecture 27/52

5.2.2 Central Design Tasks: Modularization and Layering

(Cont.)

Identifying decomposition dependencies. If a conceptual component is decomposed into lower components, there is a dependency from the corresponding parent module or subsystem to the child module or subsystem.

Identifying use-dependencies. If a conceptual component provides a service to another component, there is a dependency from the user to the provider of the service.

Page 28: Software Architecture

23/4/24 Software Architecture 28/52

5.2.2 Central Design Tasks: Modularization and Layering

(Cont.)

Figure 5.6. Initial containment relationships in imaging subsystem

<<modul e>>MFramer

<<modul e>>MImager

<<modul e>>MImageMgr

<<modul e>>MAcqControl

<<modul e>>MPi pel i neMgr

<<subsystem>>SPi pel i ne

<<modul e>>MPacketMgr

<<modul e>>MPacketi zer

<<subsystem>>SImagi ng

Page 29: Software Architecture

23/4/24 Software Architecture 29/52

5.2.2 Central Design Tasks: Modularization and Layering

(Cont.)

Figure 5.7. Alternative notations for requiring and providing an interface

<<modul e>>MImageMgr

<<modul e>>MAcqControl

<<i nterface>>IStageControl

<<i nterface>>IPi pel i neControl

<<modul e>>MPi pel i neMgr

<<modul e>>MImageMgr

<<modul e>>MAcqControl

<<modul e>>MPi pel i neMgr

IStageControl IPi pel i neControl

Page 30: Software Architecture

23/4/24 Software Architecture 30/52

5.2.2 Central Design Tasks: Modularization and Layering

(Cont.)

Figure 5.8. Imaging subsystem use-dependencies

<<module>>MPacketMgr

<<modul e>>MPacketi zer

<<module>>MImageMgr

<<module>>MAcqControl

<<module>>MPi pel i neMgr

IStageControl IPi pel i neControl

<<module>>MPi pel i ne

<<module>>MFramer

<<module>>MImager

IPacketi zer

<<module>>MPacket

IPacketMgr I ImageMgr IAcqcontrol

<<subsystem>>SImagi ng

Page 31: Software Architecture

23/4/24 Software Architecture 31/52

5.2.2 Central Design Tasks: Modularization and Layering

(Cont.)

Reviewing the ImageProcessing Layer We need to assign the image-processing module to the ImageP

rocessing layer. Next let’s take the modules corresponding to acquisition mana

gement and put them in the Application layer. The acquisition manager client (MClient) accesses the MPipel

ine module through the IAcqControl interface. Therefore we can use it as interface to the ImageProcessing layer as well.

For the probe services, let’s apply the strategy Reuse existing components, and incorporate the existing modules MProbeControl and MDataCollect into our design.

Page 32: Software Architecture

23/4/24 Software Architecture 32/52

5.2.2 Central Design Tasks: Modularization and Layering

(Cont.)

Figure 5.9. Assigning modules to layers

<<modul e>>MCl i ent

<<l ayer>>Appl i cati ons

<<modul e>>MFramer

<<modul e>>MImager

<<modul e>>MPacket

<<module>>MPi pel i ne

<<modul e>>MDataAcq

<<modul e>>MDataMgr

<<modul e>>MProbeControl

<<modul e>>MDataCol l ect

<<l ayer>>ProbeServi ce

<<l ayer>>ImageProcessi ng

Page 33: Software Architecture

23/4/24 Software Architecture 33/52

5.2.2 Central Design Tasks: Modularization and Layering

(Cont.)

Figure 5.10. Use-dependencies between layers

<<l ayer>>ProbeServi ce

<<l ayer>>ImageProcessi ng

<<l ayer>>Appl i cati ons

IDataAcq IDataMgr

IAcqControl

Page 34: Software Architecture

23/4/24 Software Architecture 34/52

5.2.2 Central Design Tasks: Modularization and Layering

(Cont.)

Adding Supporting Layers In addition to mapping conceptual components, connectors,

and ports to modules and organizing them into layers, an architect often needs to provide supporting layers.

What is needed depends on the services the software platform provides.

Page 35: Software Architecture

23/4/24 Software Architecture 35/52

5.2.2 Central Design Tasks: Modularization and Layering

(Cont.)

Table 5.3. Factors Added During Module View Design

Technological Factor Flexibility and Changeability

Impact

T3: Software technologyT3.3: Database management system (DBMS)Use a commercial DBMS The DBMS may

be upgraded every five years as technology improves.

The impact is transparent, provided it conforms to our DBMS interface standard. Change from a relational to an object-oriented DBMS may have a large impact on all components.

T5: StandardsT5.5: Standard for DBMS interfaceOpen Database Connectivity has been selected as the database access standard.

The standard is stable.

There is a large impact on components interfacing with the DBMS.

Page 36: Software Architecture

23/4/24 Software Architecture 36/52

5.2.3 Final Design Task: Interface Design

Figure 5.11. Final version of layers and their use-dependencies

<<layer>>ProbeServi ce

<<layer>>SystemServi ce

<<layer>>DatabaseServi ce

<<layer>>ErrorHandl i ng

<<layer>>OperatingSystem

<<layer>>ImageProcessing

<<layer>>Appl i cati ons

<<layer>>GUI

{al l }

{al l exceptOperatingSystem}

Page 37: Software Architecture

23/4/24 Software Architecture 37/52

5.2.3 Final Design Task: Interface Design (Cont.)

Figure 5.12. Interface definition for IAcqControl

I ni t i al i ze()Cl i ent i ni t i al i zes i nterface wi th I mageProcessi ng.

Create(I P_i d, Pi pel i ne_confi g)Create an i mage pi pel i ne wi th the gi ven confi gurati on.

Del ete(I P_i d)Stop executi on of the pi pel i ne and tear down the stages.

Termi nate()Cl i ent termi nates i nterface wi th I mageProcessi ng.

Adj ustI mage(I P_i d, Stage_i d, Message)Cl i ent adj usts the processi ng of the i mage(e. g. , growth rate, persi stence).

Page 38: Software Architecture

23/4/24 Software Architecture 38/52

5.2.3 Final Design Task: Interface Design (Cont.)

Table 5.4. Sample Module Summary Table

Module Name Description Subsystem Name

Layer Interfaces Provided

MPipelineMgr Image pipeline manager

SImaging ImageProcessing

IPipelineControlIStageControl

Page 39: Software Architecture

23/4/24 Software Architecture 39/52

5.2.4 Design Summary for IS2000 Module View

Table 5.5. Sequence of Design Decisions for IS2000 Module View

Design Decision RationaleInitial definition of layers

Create GUI layer. Decouple GUI implementation from the rest of the application.

Create ImageProcessing layer.

Strategy: Separate time-critical from nontime-critical components.

Create ProbeService layer.

Strategy: Encapsulate domain-specific hardware.

Create SystemService layer.

Strategy: Encapsulate multiprocess support facilities.

Page 40: Software Architecture

23/4/24 Software Architecture 40/52

5.2.4 Design Summary for IS2000 Module View (Cont.)

Table 5.5. Sequence of Design Decisions for IS2000 Module View (cont.)

Design Decision RationaleDefining modules for ImageProcessing

Implement Packetizer and PacketPipe as a centrally managed buffer (MPacketizer).

Recognize the high volume of data and real-time performance requirements.

Create separate modules for packetIn and acqControl ports.

Insulate the components from connector details.

Implement PipelineMgr, ImagePipe, Client/Server, and Event as a centrally managed buffer (MPipelineMgr).

Recognize the high volume of data and real-time performance requirements.

Page 41: Software Architecture

23/4/24 Software Architecture 41/52

5.2.4 Design Summary for IS2000 Module View (Cont.)

Table 5.5. Sequence of Design Decisions for IS2000 Module View (cont.)

Design Decision RationaleDefining modules for ImageProcessing (Cont.)

Create one module for pipelineControl, stageControl, imageIn, and imageOut.

Insulate Framer and Imager from details of MPipelineMgr.

Group MAcqControl, MImageMgr, and MPipelineMgr into a containing module.

Tightly coupled modules should be implemented together.

Group MPacketizer and MPacketMgr into a containing module.

Tightly coupled modules should be implemented together.

Remove subsystem SPipeline. SPipeline not needed after adding containing modules.

Page 42: Software Architecture

23/4/24 Software Architecture 42/52

5.2.4 Design Summary for IS2000 Module View (Cont.)

Table 5.5. Sequence of Design Decisions for IS2000 Module View (cont.)

Design Decision RationaleReviewing the ImageProcessing Layer

IAcqControl is provided by the ImageProcessing layer.

Provide module interfaces that are used by other layers.

Use existing modules MProbeControl and MDataCollect.

Strategy: Reuse existing components.

Adding supporting layersCreate OperatingSystem layer. Strategy 1: Encapsulate general-

purpose hardware.Strategy 2: Develop product-specific interfaces to external components.

Page 43: Software Architecture

23/4/24 Software Architecture 43/52

5.2.4 Design Summary for IS2000 Module View (Cont.)

Table 5.5. Sequence of Design Decisions for IS2000 Module View (cont.)

Design Decision RationaleAdding supporting layers (cont.)

Use a database for storing images (ImageCllection component) and for recovery (PersistentDataPipe Connector).

Successful approach in past products.

Add new factors to the technological factor table: T3.3: Database management system, T5.5: Standard for DBMS interface.

The product uses a commercial database.Strategy: Use standards.

Create DatabaseService layer. Strategy: Develop product-specific interfaces to external components.

Page 44: Software Architecture

23/4/24 Software Architecture 44/52

5.2.4 Design Summary for IS2000 Module View (Cont.)

Table 5.5. Sequence of Design Decisions for IS2000 Module View (cont.)

Design Decision RationaleAdding supporting layers (cont.)

Create ErrorHandling layer. Strategy: Encapsulate diagnostic components.

Use standard services: message catalogs and file system.

Strategy: Reduce effort for error handling.

GUI=graphical user interface; DBMS=database management system.

Page 45: Software Architecture

23/4/24 Software Architecture 45/52

5.3 Summary of Module Architecture View

Table 5.6. Summary of Module Architecture View

Element UML Element

New Stereotype

Notation

Module Class <<module>>

Interface Interface - O or

Subsystem Subsystem -

Layer Package <<layer>>

<<subsystem>>

<<l ayer>>

Page 46: Software Architecture

23/4/24 Software Architecture 46/52

5.3 Summary of Module Architecture View (Cont.)

Table 5.6. Summary of Module Architecture View (Cont.)

Relation UML Element

Notation Description

contain Association Nesting A subsystem can contain a subsystem or a module.A layer can contain layer.

composition Composition Nesting (or )

A module can be decomposed into one or more modules.

Use (also called use-dependency)

Usage Module (layer) A uses module (layer) B when A requires an interface that B provides.

Page 47: Software Architecture

23/4/24 Software Architecture 47/52

5.3 Summary of Module Architecture View (Cont.)

Table 5.6. Summary of Module Architecture View (Cont.)

Relation UML Element

Notation Description

require Usage A module or layer can require an interface.

provide Realization (with ) A module or layer can provide an interface. (with )

implement Table row A module can implement a conceptual element.Trace

assigned to Association Nesting A module can be assigned to a layer.

<<trace>>

Page 48: Software Architecture

23/4/24 Software Architecture 48/52

5.3 Summary of Module Architecture View (Cont.)

Table 5.6. Summary of Module Architecture View (Cont.)

Artifact RepresentationConceptual-module correspondence

Table

Subsystem and module decomposition

UML Class Diagram

Module use-dependencies UML Class DiagramLayer use-dependencies, modules assigned to layers

UML Class Diagram

Summary of module relations Table

Page 49: Software Architecture

23/4/24 Software Architecture 49/52

5.3 Summary of Module Architecture View (Cont.)

Figure 5.13. Meta-model of the module architecture view

LayerModule

Subsystem

0..1

cont

ain

*

0..1*

*

use

**

provide

require **

*

Interfaceprovide

require

use

0..1

cont

ain

0..1 0..1

cont

ain

*

* * * *

* * **

Assigned to

{Module (layer) A usesmodule (layer) B when Arequires an interface thatB provides.}

Page 50: Software Architecture

23/4/24 Software Architecture 50/52

5.3.1 Traceability The following three items should be

traceable in the module view:1. Critical requirements.2. Organizational and technological

factors.3. Elements in the conceptual view.

Page 51: Software Architecture

23/4/24 Software Architecture 51/52

5.3.2 Uses for the Module Architecture View

The module view descriptions can be used for:

Management of module interfaces Change impact analysis Consistency checking of interface

constraints Configuration management Effort estimation

Page 52: Software Architecture

23/4/24 Software Architecture 52/52

Thanks!


Recommended