SWE102 - 6 - Architectural Design ( Architectural Patterns (Introduction…
SWE102 - 6 - Architectural Design
Architectural Design Decisions
Architectural design is a creative process so the process differs depending on the type of system being developed.
However, a number of common decisions span all design processes and these decisions affect the nonfunctional characteristics of the system.
Fundamental Question about system
Is there a generic application architecture that can be
How will the system be distributed?
What architectural styles are appropriate?
What approach will be used to structure the system?
How will the system be decomposed into modules?
What control strategy should be used?
How will the architectural design be evaluated?
How should the architecture be documented?
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’.
Systems in the same domain often have similar
architectures that reflect domain concepts.
Achitecture and system characteristic
Localise safety-critical features in a small number of subsystems.
Include redundant components and mechanisms for fault
Use a layered architecture with critical assets in the inner layers.
Use fine-grain, replaceable components.
Localise critical operations and minimise communications. Use
large rather than fine-grain components.
4 + 1 Views
A development view
which shows how the software is
decomposed for development
A physical view
which shows the system hardware and how software components are distributed across the processors in the system
A process view
which shows how, at run-time, the
system is composed of interacting processes
Conceptual view (+1)
Related using use cases or scenarios
A logical view
which shows the key abstractions in the
system as objects or object classes.
What notations should be used for describing
Each architectural model only shows one view or
perspective of the system
What views or perspectives are useful when designing
and documenting a system’s architecture?
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 are a means of representing, sharing and
Patterns may be represented using tabular and graphical
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
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.
The system is structured into three logical components that interact with each other
Separates presentation and interaction from the system data
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. See Figure 6.3.
Can involve additional code and code complexity when the data model and interactions are simple.
Organises the system into a set of layers (or abstract
machines) each of which provide a set of services.
Supports the incremental development of sub-systems in different layers. When a layer interface changes, only the adjacent layer is affected.
Used to model the interfacing of sub-systems.
However, often artificial to structure systems in this way.
Used when building new facilities on top of existing systems;
when the development is spread across several teams with each team responsibility for a layer of functionality;
when there is a requirement for multi-level security
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.
In practice, providing a clean separation between layers is often difficult 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 request as it is processed at each layer
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.
You should use this pattern when you have a system in which large volumes of information are generated that has to be stored for a long time
You may also use it in data-driven systems where the inclusion of data in the repository triggers an action or tool.
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
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) as it is all in one place.
The repository is a single point of failure so problems in the
repository affect the whole system. May be inefficiencies in
organizing all communication through the repository
Distributing the repository across several computers may be
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.
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.
Clients are users of these services and access servers to make use of them.
In a client–server architecture, the functionality of the system is organized into services, with each service delivered from a separate server
Performance may be unpredictable
because it depends on the network as well as the system.
Each service is a single point of failure so susceptible to denial of
service attacks or server failure
May be management problems if servers are owned by different organizations.
Pipe and filter Architecture
Commonly used in data processing applications (both batch- and transaction-based) where inputs are processed in separate stages to generate related outputs.
Easy to understand and supports transformation reuse
matches the structure of many business processes.
adding transformations is straightforward.
Can be implemented as
either a sequential or concurrent system.
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.
The format for data transfer has to be agreed upon between
Each transformation must parse its
input and unparse its output to the agreed form.
This increases system overhead and may mean that it is impossible to reuse functional transformations that use incompatible data structures.
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
Application systems are designed to meet an
As businesses have much in common, their application systems also tend to have a common architecture that reflects the application requirements.
Use of application architecture
As a starting point for architectural design.
As a design checklist.
As a way of organising the work of the development
As a means of assessing components for reuse.
As a vocabulary for talking about application types.
Transaction processing applications
Event processing systems
Data processing applications
Language processing systems
Transaction Processing Systems
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.
Process user requests for information from a database
or requests to update the database.
Information System Architecture
These are transaction-based systems as interaction with these systems generally involves database transactions.
The user interface
Information systems have a generic architecture that
can be organised as a layered architecture.
Web-Based Information System
Language Processing System
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
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 lexical analyzer, which takes input language tokens
and converts them to an internal form.
A syntax tree, which is an internal structure representing
the program being compiled.
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.
Objectives of Architecture Design
have been introduced to the idea of architectural patterns, well-tried ways of organizing system architectures, which can be reused in system designs;
understand the decisions that have to be made about the system architecture during the architectural design process;
know the architectural patterns that are often used in different types of application system, including transaction processing systems and language processing systems.
understand why the architectural design of software is important;
Introduction to Architecture Design
Advantages of explicit achitecture
Architecture may be used as a focus of discussion by system
Means that analysis of whether the system can meet its nonfunctional requirements is possible.
The architecture may be reusable across a range of systems
Product-line architectures may be developed.
Architecture in the small
is concerned with the architecture of individual programs. At this level, we are concerned with the way that an individual program is decomposed into components.
Architecture in the large
is concerned with the architecture of complex enterprise systems that include other systems, programs, and program components. These enterprise systems are distributed over different computers, which may be owned and managed by different companies.
What is Architecture Design
The design process for identifying the sub-systems making up a system and the framework for sub-system control and communication is architectural design.
The output of this design process is a description of the
An early stage of the system design process.(chapter 2)
Represents the link between specification and design
Often carried out in parallel with some specification
It involves identifying major system components and
Use of Architecture Models
As a way of facilitating discussion about the system
As a way of documenting an architecture that has been