Top Banner
Architectural Design
93

Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Apr 13, 2018

Download

Documents

lamtuong
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Architectural Design

Page 2: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Topics

i. Architectural design decisions

ii. Architectural views

iii. Architectural patterns

iv. Application architectures

2Chapter 6 Architectural design

Page 3: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

ARCHITECTURAL DESIGN DECISIONS

PART 1

Page 4: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Recap on SDLC Phases & Artefacts

Domain Analysis @ Business Process

Requirement

Analysis

Design

Implementation

Testing & Deployment

Maintenance & Evolution

Domain Model (Class Diagram)

1) Functional & Non-Functional requirement 2) Use Case diagram

1) System Sequence Diagram 2) Activity Diagram

1) Class Diagram (refined) 2) Detail Sequence Diagram3) State Diagram

1) Application Source Code2) User Manual Documentation

1) Test Cases 2) Prototype

1) Change Request Form

SRS

Page 5: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Recap on SDLC Phases & Artefacts

Domain Analysis @ Business Process

Requirement

Analysis

Design

Implementation

Testing & Deployment

Maintenance & Evolution

Domain Model (Class Diagram)

1) Functional & Non-Functional requirement 2) Use Case diagram

1) System Sequence Diagram 2) Activity Diagram

1) Class Diagram (refined) 2) Detail Sequence Diagram3) State Diagram

1) Application Source Code2) User Manual Documentation

1) Test Cases 2) Prototype

1) Change Request Form

SRS

Page 6: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Recap on Design process (Ch.2)

Page 7: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Recap on Design process (Ch.2)

Page 8: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Definitions

• Architectural design :

– The design process for identifying the sub-systems making up a system and the frameworkfor sub-system control and communication.

• The output of this design process is a description ofthe software architecture.

8Chapter 6 Architectural design

Page 9: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Architecture Analogy for Software vs. House?

Page 10: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Architectural design decisions (NINE QUESTIONS)

1. What approach will be used to structure the system?

2. What architectural styles are appropriate?

3. What control strategy should be used?

4. How will the structural components be decomposed into subcomponents?

5. Is there a generic application architecture that can be used?

6. What architectural organization is best for delivering the non functionalrequirements?

7. How will the system be distributed?

8. How will the architectural design be evaluated?

9. How should the architecture be documented?

17Chapter 6 Architectural design

Page 11: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Rationale on Architectural design decisions• Architectural design is a creative process so the process differs

depending on the type of system being developed.

• Due to the creative process, the activities within the process depend on the type of the system being developed, background and experience of system architect, specific requirements of the system

• During architectural design process, system architects have to make a number of structural decisions that profoundly affect the system and its development process 9 DESIGN DECISION QUESTIONS

18Chapter 6 Architectural design

Page 12: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

ARCHITECTURAL VIEWS

PART 2

Page 13: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

1. What approach will be used to structure the system?

20Chapter 6 Architectural design

Architectural design decisions (NINE QUESTIONS)

Page 14: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Analogy of House Architectural View

Chapter 6 Architectural design 21

Exterior elevations of the front, rear,

and sides of the house

Interior elevations showing

details of fireplaces, cabinets,

built-in units, and other special

interior features.

Different

views of

a house

Detailed floor plansRoof plans showing details of the layout.

Schematic electrical layouts

Page 15: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange
Page 16: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Architectural views

• What views or perspectives are useful when designing and documenting a system’s architecture?

• What notations should be used for describing architectural models?

• Each architectural model only shows one view or perspective of the system.

– It might show how a system is decomposed into modules, how the run-time processes interact or the different ways in which system components are distributed across a network.

– For both design and documentation, you usually need to present multiple views of the software architecture.

27Chapter 6 Architectural design

Page 17: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

4+1 view architecture

Chapter 6 Architectural design 28

Page 18: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

4 + 1 view model of software architecture

1. A logical view: shows the key abstractions in the system as objects or object classes.

2. A process view : shows how, at run-time, the system is composed of interacting processes.

3. A development view: shows how the software is decomposed for development.

4. A physical view: shows the system hardware and how software components are distributed across the processors in the system.

• Related using use cases or scenarios (+1)

29Chapter 6 Architectural design

Page 19: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

ARCHITECTURAL PATTERNS

PART 3

Page 20: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

2. What architectural styles are appropriate?

3. What control strategy should be used?

4. How will the structural components be decomposed into subcomponents?

31Chapter 6 Architectural design

Architectural design decisions (NINE QUESTIONS)

Page 21: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

32

Architectural Design Classification

Architectural Design

Architectural

StyleControl

Strategy

Modular

Decomposition

Repository

Model

Client Server

Model

Layered

ModelObject Oriented

Model

Function

Oriented

Model

Centralized

Control Model

Event-Driven

Control Model

Call-Return

Model

Manager

ModelBroadcast

Model

Interrupt-

Driven Model

Pipe line Model View

Controller

Page 22: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Architecture reuse

• Systems in the same domain often have similar architectures that reflect domain concepts.

• Application product lines are built around a core architecture with variants that satisfy particular customer requirements.

• The architecture of a system may be designed around one of more architectural patterns or ‘styles’.

– These capture the essence of an architecture and can be instantiated in different ways.

– Discussed later in this lecture.

33Chapter 6 Architectural design

Page 23: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Architectural patterns

• Patterns are a means of representing, sharing and reusing knowledge.

• An architectural pattern is a stylized description of good design practice, which has been tried and tested in different environments.

• Patterns should include information about when they are and when the are not useful.

• Patterns may be represented using tabular and graphical descriptions.

34Chapter 6 Architectural design

Page 24: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

35

Architectural Design Classification

Architectural Design

Architectural

StyleControl Strategy Modular

Decomposition

Repository

Model

Client Server

Model

Layered

ModelObject Oriented

Model

Function

Oriented

Model

Centralized

Control Model

Event-Driven

Control Model

Call-Return

Model

Manager

ModelBroadcast

Model

Interrupt-

Driven Model

Pipe line Model View

Controller

Page 25: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

1. Repository architecture

• Sub-systems must exchange data. This may be done in two ways:– Shared data is held in a central database or repository and

may be accessed by all sub-systems;

– Each sub-system maintains its own database and passes data explicitly to other sub-systems.

• When to use:– large amounts of data are to be shared and stored for a

long time.

– in data-driven systems where the inclusion of data in the repository triggers an action or tool

36Chapter 6 Architectural design

Page 26: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

The Repository architecture

Advantages Disadvantages

•Components can be independent.•Changes made by one component can be propagated to all components.

• All data can be managed consistently (e.g., backups done at the same time)

•Problems in the repository affect the whole system.

•Inefficiencies in organizing all communication through the repository.

• Difficulties in distributing the repository across several computers

Page 27: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

A repository architecture for an IDE

38Chapter 6 Architectural design

Page 28: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

39

Architectural Design Classification

Architectural Design

Architectural

StyleControl

Strategy

Modular

Decomposition

Repository

Model

Client Server

Model

Layered

ModelObject Oriented

Model

Function

Oriented

Model

Centralized

Control Model

Event-Driven

Control Model

Call-Return

Model

Manager

ModelBroadcast

Model

Interrupt-

Driven Model

Pipe line Model View

Controller

Page 29: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

2. Client-server architecture

• Distributed system model which shows how data and processing is distributed across a range of components.– Can be implemented on a single computer.

– Set of stand-alone servers which provide specific services such as printing, data management, etc.

– Set of clients which call on these services.

– Network which allows clients to access servers.

• Used when data in a shared database has to be accessed from a range of locations.

40Chapter 6 Architectural design

Page 30: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

The Client–server pattern

Advantages Disadvantages

•Servers can be distributed across a network.

•Each service is a single point of failure so susceptible to denial of service attacks or server failure.

•General functionality (e.g., a printing service) can be available to all clients and does not need to be implemented by all services.

•Performance may be unpredictable because it depends on the network as well as the system.

Page 31: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

A client–server architecture for a film library

42Chapter 6 Architectural design

Page 32: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

43

Architectural Design Classification

Architectural Design

Architectural

StyleControl

Strategy

Modular

Decomposition

Repository

Model

Client Server

Model

Layered

ModelObject Oriented

Model

Function

Oriented

Model

Centralized

Control Model

Event-Driven

Control Model

Call-Return

Model

Manager

ModelBroadcast

Model

Interrupt-

Driven Model

Pipe line Model View

Controller

Page 33: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

44

3.The Layered Model

• Organize a system into layers

– Each layer provides services to the one outside it and actsas a client to the layer inside

– The design includes protocols that explain how each pairof layers will interact

– Each layer can be thought of as an abstract machine• Also called an abstract machine model

– Incremental development of sub-systems in different layers• When a layer interface changes, only the adjacent layer is affected.

Page 34: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

3.The Layered Model

• Used when

– building new facilities on top of existing systems

– the development is spread across several teams with each team responsibility for a layer of functionality

– there is a requirement for multi-level security

– security is a critical requirement.

• Example: layered security architecture: a system to provide file security

Page 35: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

46

3.The Layered Model

• Advantages :

• Each layer can be considered to be an increasing level ofabstraction

• Designers can use the layers to decompose a problem intoa sequence of more abstract steps

• It’s easy to add or modify a layer as the need arises

• Disadvantages :

• Not easy to structure a system in layers

• The multiple layers of abstraction are not always evidentwhen examine a set of requirements

• System performance may suffer from the extracoordination among the layers

Page 36: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

47

Layering Example: Version Management System

Page 37: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

The architecture of the LIBSYS system

48Chapter 6 Architectural design

Page 38: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

49

Variant: 3-Layer Data Access

Page 39: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

50

How many layers?

Page 40: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

51

Database layer

• Sometimes is further divided into:

– Middleware Layer

– System software Layer

• The middleware layer offers components systems providing utility classes and platform-independent services such as distributed object computing in heterogeneous environments. Examples in this layer are GUI builders, DBMS interfaces, CORBA broker, and so on.

• The system software layer contains the software for the computing and networking infrastructure, such as OS, interfaces to specific hardware (i.e., drivers), sockets, and so on. Some components in this layer are hardware (or platform) dependent

Page 41: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

52

Page 42: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

53

Architectural Design Classification

Architectural Design

Architectural

StyleControl

Strategy

Modular

Decomposition

Repository

Model

Client Server

Model

Layered

ModelObject Oriented

Model

Function

Oriented

Model

Centralized

Control Model

Event-Driven

Control Model

Call-Return

Model

Manager

ModelBroadcast

Model

Interrupt-

Driven Model

Pipe line Model View

Controller

Page 43: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

4. Pipe and filter architecture

• The processing of the data in a system is organized so that each processing component (filter) is discrete and carries out one type of data transformation.

• The data flows (as in a pipe) from one component to another for processing. – May be referred to as a pipe and filter model (as in UNIX

shell).

• Commonly used in data processing applications (both batch- and transaction-based) where inputs are processed in separate stages to generate related outputs.– Not really suitable for interactive systems.

54Chapter 6 Architectural design

Page 44: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

4. Pipe and filter architecture

Advantages• Easy to understand and supports transformation reuse.

• Workflow style matches the structure of many business processes.

• Evolution by adding transformations is straightforward.

• Can be implemented as either a sequential or concurrent system.

Disadvantages

• The format for data transfer has to be agreed upon between communicating transformations.

• Each transformation must parse its input and unparse its output to the agreed form. – this increases system overhead

Page 45: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

An example of the pipe and filter architecture

56Chapter 6 Architectural design

Page 46: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

57

Architectural Design Classification

Architectural Design

Architectural

StyleControl

Strategy

Modular

Decomposition

Repository

Model

Client Server

Model

Layered

ModelObject Oriented

Model

Function

Oriented

Model

Centralized

Control Model

Event-Driven

Control Model

Call-Return

Model

Manager

ModelBroadcast

Model

Interrupt-

Driven Model

Pipe line Model View

Controller

Page 47: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

5. The Model-View-Controller (MVC) pattern

• Separates presentation and interaction from the system data.

• The system is structured into three logical components that interact with each other.

– the Model component manages the system data and associated operations on that data.

– the View component defines and manages how the data is presented to the user.

– the Controller component manages user interaction (e.g., key presses, mouse clicks, etc.) and passes these interactions to the View and the Model.

Page 48: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

The organization of the Model-View-Controller

59Chapter 6 Architectural design

Page 49: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

5. The Model-View-Controller (MVC) pattern

• Used when there are multiple ways to view and interact with data.

• Also used when the future requirements for interaction and presentation of data are unknown.

• Advantages– Allows the data to change independently of its representation and vice

versa.

– Supports presentation of the same data in different ways with changes made in one representation shown in all of them.

• Disadvantages– Can involve additional code and code complexity when the

data model and interactions are simple.

Page 50: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Web application architecture using the MVC pattern

61Chapter 6 Architectural design

Page 51: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

MVC architecture for online ordering system

Page 52: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

2. What architectural styles are appropriate?

3. What control strategy should be used?

4. How will the structural components be decomposed into subcomponents?

63Chapter 6 Architectural design

Architectural design decisions (NINE QUESTIONS)

Page 53: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

64

Architectural Design Classification

Architectural Design

Architectural

StyleControl

Strategy

Modular

Decomposition

Repository

Model

Client Server

Model

Layered

ModelObject Oriented

Model

Function

Oriented

Model

Centralized

Control Model

Event-Driven

Control Model

Call-Return

Model

Manager

ModelBroadcast

Model

Interrupt-

Driven Model

Pipe line Model View

Controller

Page 54: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

65

Control Styles

• Are concerned with the control flow between sub-systems

• Sub-systems must be controlled

• Two generic control styles

– Centralized control• One sub-system has overall responsibility for control and starts

and stops other sub-systems.

– Event-based control• Each sub-system can respond to externally generated events from

other sub-systems or the system’s environment.

Page 55: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

66

1. Centralized Control

• A control sub-system takes responsibility for managing the execution of other sub-systems.

• Call-return model

– Top-down subroutine model where control starts at the top of a subroutine hierarchy and moves downwards. Applicable to sequential systems.

• Manager model

– Applicable to concurrent systems. One system component controls the stopping, starting and coordination of other system processes. Can be implemented in sequential systems as a case statement.

Page 56: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

67

1.1. The Call-Return Model

Page 57: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

68

1.2. The Manager Model

Page 58: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

69

Architectural Design Classification

Architectural Design

Architectural

StyleControl

Strategy

Modular

Decomposition

Repository

Model

Client Server

Model

Layered

ModelObject Oriented

Model

Function

Oriented

Model

Centralized

Control Model

Event-Driven

Control Model

Call-Return

Model

Manager

ModelBroadcast

Model

Interrupt-

Driven Model

Pipe line Model View

Controller

Page 59: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

70

2. Event-Driven System

• An event vs. an input– Driven by externally generated events where the timing of

the event is outwith the control of the sub-systems which process the event.

• Two principal event-driven models– Broadcast models. An event is broadcast to all sub-

systems. Any sub-system which can handle the event may do so – different computers on a network;

– Interrupt-driven models. Used in real-time systems where interrupts are detected by an interrupt handler and passed to some other component for processing – real-time systems.

Page 60: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

2.1. Broadcast Model

• Effective in integrating sub-systems on different computers in a network.

• Sub-systems register an interest in specific events. When these occur, control is transferred to the sub-system which can handle the event.

• Control policy is not embedded in the event and message handler. Sub-systems decide on events of interest to them.

• However, sub-systems don’t know if or when an event will be handled.

71

Page 61: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

72

A Broadcast Model

Page 62: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

2.2. Interrupt-driven control

• Used in real-time systems where fast response to an event is essential.

• There are known interrupt types with a handler defined for each type.

• Each type is associated with a memory location and a hardware switch causes transfer to its handler.

• Allows fast response but complex to program and difficult to validate.

73

Page 63: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

74

An Interrupt-Driven Model

Page 64: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

75

Architectural Design Classification

Architectural Design

Architectural

StyleControl

Strategy

Modular

Decomposition

Repository

Model

Client Server

Model

Layered

ModelObject Oriented

Model

Function

Oriented

Model

Centralized

Control Model

Event-Driven

Control Model

Call-Return

Model

Manager

ModelBroadcast

Model

Interrupt-

Driven Model

Pipe line Model View

Controller

Page 65: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

2. What architectural styles are appropriate?

3. What control strategy should be used?

4. How will the structural components be decomposed into subcomponents?

76Chapter 6 Architectural design

Architectural design decisions (NINE QUESTIONS)

Page 66: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

77

Architectural Design Classification

Architectural Design

Architectural

StyleControl

Strategy

Modular

Decomposition

Repository

Model

Client Server

Model

Layered

ModelObject Oriented

Model (next topic)

Function

Oriented

Model

Centralized

Control Model

Event-Driven

Control Model

Call-Return

Model

Manager

ModelBroadcast

Model

Interrupt-

Driven Model

Pipe line Model View

Controller

Page 67: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

APPLICATION ARCHITECTURAL

PART 4

Page 68: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

5. Is there a generic application architecture that can be used?

79Chapter 6 Architectural design

Architectural design decisions (NINE QUESTIONS)

Page 69: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Application architectures

• Application systems are designed to meet an organizational need.

• As businesses have much in common, their application systems also tend to have a common architecture that reflects the application requirements.

• A generic application architecture is an architecture for a type of software system that may be configured and adapted to create a system that meets specific requirements.

80Chapter 6 Architectural design

Page 70: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Use of application architectures

• As a starting point for architectural design.

• As a design checklist.

• As a way of organizing the work of the development team.

• As a means of assessing components for reuse.

• As a vocabulary for talking about application types.

81Chapter 6 Architectural design

Page 71: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Examples of application types

• Data processing applications– Data driven applications that process data in batches without explicit

user intervention during the processing.

• Transaction processing applications– Data-centred applications that process user requests and update

information in a system database.

• Event processing systems– Applications where system actions depend on interpreting events

from the system’s environment.

• Language processing systems– Applications where the users’ intentions are specified in a formal

language that is processed and interpreted by the system.

Chapter 6 Architectural design 82

Page 72: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Application type examples

• Focus here is on transaction processing and language processing systems.

• Transaction processing systems– E-commerce systems;

– Reservation systems.

• Language processing systems– Compilers;

– Command interpreters.

83Chapter 6 Architectural design

Page 73: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Transaction processing systems

• Process user requests for information from a database or requests to update the database.

• From a user perspective a transaction is:– Any coherent sequence of operations that satisfies a goal;

– For example - find the times of flights from London to Paris.

• Users make asynchronous requests for service which are then processed by a transaction manager.

84Chapter 6 Architectural design

Page 74: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

The structure of transaction processing applications

85Chapter 6 Architectural design

Page 75: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

The software architecture of an ATM system

86Chapter 6 Architectural design

Page 76: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Information systems architecture

• Information systems have a generic architecture that can be organised as a layered architecture.

• These are transaction-based systems as interaction with these systems generally involves database transactions.

• Layers include:

– The user interface

– User communications

– Information retrieval

– System database

87Chapter 6 Architectural design

Page 77: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Layered information system architecture

88Chapter 6 Architectural design

Page 78: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

The architecture of the MHC-PMS

89Chapter 6 Architectural design

Page 79: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Web-based information systems

• Information and resource management systems are now usually web-based systems where the user interfaces are implemented using a web browser.

• For example, e-commerce systems are Internet-based resource management systems that accept electronic orders for goods or services and then arrange delivery of these goods or services to the customer.

• In an e-commerce system, the application-specific layer includes additional functionality supporting a ‘shopping cart’ in which users can place a number of items in separate transactions, then pay for them all together in a single transaction.

Chapter 6 Architectural design 90

Page 80: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Server implementation

• These systems are often implemented as multi-tier client server/architectures (discussed in Chapter 18)

– The web server is responsible for all user communications, with the user interface implemented using a web browser;

– The application server is responsible for implementing application-specific logic as well as information storage and retrieval requests;

– The database server moves information to and from the database and handles transaction management.

Chapter 6 Architectural design 91

Page 81: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Language processing systems

• Accept a natural or artificial language as input and generate some other representation of that language.

• May include an interpreter to act on the instructions in the language that is being processed.

• Used in situations where the easiest way to solve a problem is to describe an algorithm or describe the system data

– Meta-case tools process tool descriptions, method rules, etc and generate tools.

92Chapter 6 Architectural design

Page 82: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

The architecture of a language processing system

93Chapter 6 Architectural design

Page 83: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Compiler components

• A lexical analyzer, which takes input language tokens and converts them to an internal form.

• A symbol table, which holds information about the names of entities (variables, class names, object names, etc.) used in the text that is being translated.

• A syntax analyzer, which checks the syntax of the language being translated.

• A syntax tree, which is an internal structure representing the program being compiled.

Chapter 6 Architectural design 94

Page 84: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Compiler components

• A semantic analyzer that uses information from the syntax tree and the symbol table to check the semantic correctness of the input language text.

• A code generator that ‘walks’ the syntax tree and generates abstract machine code.

Chapter 6 Architectural design 95

Page 85: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

A pipe and filter compiler architecture

96Chapter 6 Architectural design

Page 86: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

A repository architecture for a language processing system

97Chapter 6 Architectural design

Page 87: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

6. What architectural organization is best for delivering the non functional

requirements?

98Chapter 6 Architectural design

Architectural design decisions (NINE QUESTIONS)

Page 88: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Non functional requirements and Architectural Organization (Question 6)

However, a number of common decisions span all design processes and these decisions affect the non-functional characteristics of the system.

• Performance: Localise critical operations and minimise communications. Use large rather than fine-grain components.

• Security :Use a layered architecture with critical assets in the inner layers.

• Safety: Localise safety-critical features in a small number of sub-systems.

• Availability:Include redundant components and mechanisms for fault tolerance.

• Maintainability: Use fine-grain, replaceable components.

99Chapter 6 Architectural design

Page 89: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Key points

• A software architecture is a description of how a software system is organized.

• Architectural design decisions include decisions on the type of application, the distribution of the system, the architectural styles to be used.

• Architectures may be documented from several different perspectives or views such as a conceptual view, a logical view, a process view, and a development view.

• Architectural patterns are a means of reusing knowledge about generic system architectures. They describe the architecture, explain when it may be used and describe its advantages and disadvantages.

Chapter 6 Architectural design 100

Page 90: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Key points

• Models of application systems architectures help us understand and compare applications, validate application system designs and assess large-scale components for reuse.

• Transaction processing systems are interactive systems that allow information in a database to be remotely accessed and modified by a number of users.

• Language processing systems are used to translate texts from one language into another and to carry out the instructions specified in the input language. They include a translator and an abstract machine that executes the generated language.

101Chapter 6 Architectural design

Page 91: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

EXERCISE

Page 92: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Architectural design decisions (NINE QUESTIONS)

1. What approach will be used to structure the system?

2. What architectural styles are appropriate?

3. What control strategy should be used?

4. How will the structural components be decomposed into subcomponents?

5. Is there a generic application architecture that can be used?

6. What architectural organization is best for delivering the non functionalrequirements?

7. How will the system be distributed?

8. How will the architectural design be evaluated?

9. How should the architecture be documented?

103Chapter 6 Architectural design

Page 93: Architectural Design - Universiti Teknologi Malaysia SE... ·  · 2014-05-12• Architectural design is a creative process so the process differs ... •Sub-systems must exchange

Exercise

• During architectural design stage, a softwarearchitect have to identify the appropriate “designdecisions” for the specified requirements duringrequirement and analysis stages.

• These “design decisions” are crucial for the nextphase of development for the proposed application.

• Suggest the “design decisions” for your group projectbased on the specified requirements in previous SRS.

• Your “design decisions” must answered all the 6questions.