0% found this document useful (0 votes)
20 views7 pages

CH 6 Architecture

This document provides an outline of key concepts in architectural design. It defines architectural design as identifying the subsystems that make up a system and their relationships. It then discusses common architectural patterns like MVC, layered architectures, and client-server. Key points covered include defining subsystems and services, specifying subsystem interfaces, and using architectural patterns to share and reuse design knowledge across projects.

Uploaded by

Shiva K
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views7 pages

CH 6 Architecture

This document provides an outline of key concepts in architectural design. It defines architectural design as identifying the subsystems that make up a system and their relationships. It then discusses common architectural patterns like MVC, layered architectures, and client-server. Key points covered include defining subsystems and services, specifying subsystem interfaces, and using architectural patterns to share and reuse design knowledge across projects.

Uploaded by

Shiva K
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Architectural Design

Outline:

• Definitions
• Models
Architectural Design
• Architectural Patterns
! 1. MVC: Model-View-Controller
! 2. Layered (or tiered)
Chapter 6 3. Pipe and Filter
4. Repository
5. Client-Server

!1 !2

Software Design Architectural Design


• Process of converting the requirements into the
• Architectural Design:
design of the system.
-the design process for identifying:
the desig
• Definition of how the software is to be structured or - the subsystems making up a system and
organized. - the relationships between the subsystems
!
• For large systems, this is divided into two parts: • what’s a subsystem?
- A subsystem is a sub-part of the system that provides
- Architectural design defines main components of the system (and/or consumes) services to other subsystems
and how they interact.
- subsystem = component of the system.
- Detailed design components are decomposed and described
at a much finer level of detail. • Architectural Design = subsystem decomposition
- break the system into subparts with the goal of
What is a component? simplifying the overall system.

!3 !4
Services and subsystem interfaces Architectural Models
• A service is a set of related operations that share
• Simple box and line diagrams
a common purpose.
• Subsystem interface: the set of one subsystems’
• Each box is a component of the system (a
subsystem)
operations that are available to other subsystems.
- specification includes the signature of each operation: • Boxes within boxes are subcomponents of a
name of the operation, types of each parameter. subsystem
• Why specify interfaces to components? • Arrows indicate data and/or messages are passed
- so components may be developed in parallel between components
• Helps promote independence (separation).
- can make changes behind the interface without affecting
components using that interface.
!5 !6

Example: Architecture of a
packing robot control system Architectural Patterns
The robot uses the vision Vision • An architectural pattern is an abstract description of
system to pick out
system
system organization that has been successful in
objects on a conveyor,
identify the type of object,
previous projects (in various contexts)
Object Arm Gripper
and select the right kind
of packaging. It packs the
identification
system
controller controller
• Patterns are a means of representing, sharing and
object, and places it on reusing knowledge.
another conveyor.
- Architectural designers can browse pattern descriptions to
Packaging
selection identify potential candidates for their project
system

• Each pattern description should indicate in which


contexts it is and is not useful.
Packing


Conveyor
system controller Design goals: simplicity (reduce complexity) and
independence (reduce dependence).
!7 !8
1. Model-View-Controller Model-View-Controller (MVC)
(MVC) Pattern Pattern Diagram
• Commonly used in desktop, mobile phone, and
web applications. Controller View
selection
View

Maps user actions Renders model

• Used to separate the data (the model) from the to model updates
Selects view
User events
Requests model updates
Sends user events to

way it is presented to the user (the views) controller

Change

• Model objects encapsulate the data. State


change
notification
State query
(get values


(set values Model
View objects present data to and receive actions in model)
Encapsulates application
from model)

from the user. state


Notifies view of state
changes

• Controller Responds to user actions (from View)


by updating Model (and View).

!9 !10

Model-View-Controller (MVC)
2. Layered Architecture Pattern
Pattern Description
Name MVC (Model-View-Controller)
• System functionality is organized into
Description Separates presentation and interaction from the system data. The system
is structured into three logical components that interact with each other. ! separate layers.
• Model component manages the system data and associated operations
on that data. !
• View component defines and manages how the data is presented to the • Each layer relies only on facilities and
user. !
• Controller component manages user interaction (e.g., key presses,
services of layer immediately beneath it.

mouse clicks, etc.) and passes these interactions to the View and the
Model. Advantages:
Example Most web-based application systems, most desktop apps.
When used When there are multiple ways to view and interact with data. Also used
- Changes to one layer do not affect layers above
when the future requirements for interaction and presentation of data are - If interface changes, affects only layer above.
unknown.
Advantages Allows the data (model) to change independently of its representation
- Easily replace one layer by another equivalent one (with
(view) and vice versa. Supports presentation of the same data in different same interface).
ways with user changes made in one representation shown in all of them.
Disadvantages Can involve additional code and code complexity when the data model
- Portability: need to change only bottom layer to port to
and interactions are simple. different machine(s).
!11 !12
Layered Architecture Pattern Layered Architecture Pattern
Diagram Example: LIBSYS
Allows controlled electronic Web browser interface
access to copyrighted
User interface
material from a group of
university libraries
LIBSYS Forms and Print
User interface management login query manager manager
Authentication and authorization

Core business logic/application functionality Distributed Document Rights


Accounting
search retrieval manager
System utilities

Library index
System support (OS, database etc.)

DB1 DB2 DB3 DB4 DBn

Databases from
different libraries
!13 !14

Layered Architecture Pattern


3. Pipe and Filter Architecture
Description
Name Layered architecture
• A series of transformations on data
Description Organizes the system into layers with related functionality associated
with each layer. A layer provides services to the layer above it so the
• Composed of:
lowest-level layers represent core services that are likely to be used - A set of “filters”, each one transforming some input stream into
throughout the system.
an output stream.
Example A layered model of a system for sharing copyright documents held in
different libraries: LIBSYS - Pipes connecting the filters.


When used Used when !
• building new facilities on top of existing systems !
• the development is spread across several teams with each team
Data is transformed as it moves through the system.
responsibility for a layer of functionality !
• there is a requirement for multi-level security. • Transformations can be run concurrently.

Advantages Allows replacement of entire layers so long as the interface is
maintained. Redundant facilities (e.g., authentication) can be provided in
each layer to increase the dependability of the system.
Commonly used in batch processing systems and
Disadvantages In practice, providing a clean separation between layers is often difficult embedded control systems.

and a high-level layer may have to interact directly with lower-level
layers rather than through the layer immediately below it. Performance
can be a problem because of multiple levels of interpretation of a service
Difficult to use for interactive systems.
request as it is processed at each layer.

!15 !16
Pipe and Filter Architecture Pipe and Filter Example:
Example: Processing invoices Compiler (g++)
Issue
Receipts
receipts

Read issued
invoices
Identify
payments
lexical analysis Symbol table
Find Issue
produces stream Syntax tree
payments payment Reminders of tokens
due reminder
Invoices Payments

source Lexical Syntactic Semantic Code target


code analysis analysis analysis generation code

Syntax tree is output of Syntactic


Once a week, payments are reconciled against invoices (issued
at the beginning of the month). For paid invoices, it issues a analysis, which is transformed by
receipt. For unpaid, it issues a reminder. Semantic analysis

!17 !18

Pipe and Filter Architecture


4. Repository Architecture
Description
Name Pipe and filter • Data is stored in a central shared repository.
Description The processing of the data in a system is organized so that each
processing component (filter) is discrete and carries out one type
• Components interact through the repository only.

of data transformation. The data flows (as in a pipe) from one
component to another for processing. Suited to applications whose data is generated by
Example The pipe and filter system used for processing invoices.
one component and used by another.
When used Commonly used in data processing applications (both batch- and
transaction-based) where inputs are processed in separate
stages to generate related outputs. • Advantages:
Advantages Easy to understand and supports transformation reuse. Workflow - Components are independent/separate.
style matches the structure of many business processes.
Evolution by adding transformations is straightforward. Can be - Changes to data are automatically available to other
implemented as either a sequential or concurrent system.
Disadvantages The format for data transfer has to be agreed upon between
components.


communicating transformations. Each transformation must parse
its input and unparse its output to the agreed form. This Communication between components may be
increases system overhead and may mean that it is impossible to
reuse functional transformations that use incompatible data inefficient.
structures.
!19 !20
Repository Architecture Example: Repository Architecture
Compiler/IDE (eclipse) Description
Name Repository

Lexical Syntax Semantic


analyzer analyzer analyzer
Description All data in a system is managed in a central repository that is accessible to all
system components. Components do not interact directly, only through the
repository.
Example An IDE where the components use a repository of system design information.
Each software component generates information which is then available for
Pretty- Abstract Grammar use by other tools.
Optimizer
printer syntax tree definition
When used • when large volumes of information are generated that has to be stored for a
long time.!
• in data-driven systems where the inclusion of data in the repository triggers
Symbol Output Code an action or tool.
Editor
table definition generator Advantages Components can be independent—they do not need to know of the existence
of other components. Changes made by one component can be propagated to
all components. All data can be managed consistently (e.g., backups done at
Repository the same time) as it is all in one place.
Disadvantages The repository is a single point of failure so problems in the repository affect
the whole system. May be inefficiencies in organizing all communication
Grammar definition: Output definition: through the repository. Distributing the repository across several computers
may be difficult.
syntax rules for input syntax rules for
language output language
!21 !22

Client-Server Architecture
5. Client-Server Architecture
Example: Film Library
• Commonly used organization for distributed systems.
• Composed of:
Serves information,
Client 1 Client 2 Client 3 Client 4

- A set of servers that offer specific (unique) services to other videos, still photos.
components. Catalog server
handles searching. Internet
- A set of clients that call on services offered by the servers
Clients are multiple
- A network that allows the clients to access the services. instances of a user


interface (in a web
Clients make remote procedure calls to servers using browser).
Catalog
server
Video
server
Picture
server
Web
server
a protocol like http, then wait for reply. Library Film store Photo store Film and


catalogue photo info.
Several instances of client on different machines.

!23 !24
Client-Server Architecture
Description
Name Client-server

Description In a client–server architecture, the functionality of the system is organized


into services, with each service delivered from a separate server. Clients
are users of these services and access servers to make use of them.

Example The film and video/DVD library organized as a client–server system.

When used Used when data in a shared database has to be accessed from a range of
locations. Because servers can be replicated, may also be used when the
load on a system is variable.

Advantages The principal advantage of this model is that servers can be distributed
across a network. General functionality (e.g., a printing service) can be
available to all clients and does not need to be implemented by all services.

Disadvantages Each service is a single point of failure so susceptible to denial of service


attacks or server failure. Performance may be unpredictable because it
depends on the network as well as the system. May be management
problems if servers are owned by different organizations.

!25

You might also like