9-Architectural design
9-Architectural design
(vthnhan@vnu.edu.vn)
Architectural views
Architectural patterns
Application architectures
However, they have been criticized for their lack of semantics, as they do
systems
Useful for communication with the system stakeholders and for project planning, as it is
not cluttered with detail
They can discuss the system as a whole without being confused by low-level details
The aim here is co produce a complete system model that shows the different
components of the system, their interfaces, and their connection
However, a number of common decisions are shared across all design processes,
and these decisions significantly influence the system’s non-functional
characteristics
VS.
w.r.t
performance
Performance
Localize critical operations and minimize communication overhead
Use large, coarse-grained components rather than fine-grained ones
Security
use a layered architecture, placing critical asset in the inner layers
Safety
localize safety-critical features within a small number of subsystems
Availability
include redundant components and implement mechanism for fault tolerance
Maintainability
Use fine-grained, replaceable components to ease updates and repairs
Each architectural model represent only one view or perspective of the system
For example, it might show how the system is decomposed into modules, how run-
time processes interact, or how system components are distributed across a network
A logical view – shows the key abstraction of the system, typically represented as
objects or object classes
A physical view – shows the system’s hardware and how the software components
are distributed across processors
A development view – shows how the software is decomposed for development
purposes (e.g., into packages or modules)
A process view shows how the system’s processes and threads interact at runtime
and how system components communicate. Useful for understanding performance,
scalability, and throughput.
Related use cases or scenarios (+1) – illustrate how the system behaves in
practice and help validate the architecture across different views
Patterns should include information about when they are applicable and when
they are not
Name MVC
Description Separate representation and interaction from the system data by structuring the system
into 3 logical components that interact with each other
- The Model component manages the system data and the operations associated with
tat data
- The View component defines and manages how the data is represented to the user
- The Controller component handles user interaction (e.g., key presses, mouse clicks)
and passes these inputs to the View and the Model
Example Next slides shows the architecture of a web-based application system organization
using the MVC pattern
When used used when there are multiple ways to view and interact with data, or when future
requirements for data interaction and presentation are unknown
Advantages Allows data to change independently of its representation, and vice verse.
Supports representing the same data in different ways, with changes made in one
representation reflected in all others
Shared data is stored in a central database or repository that can be accessed by all sub-
systems
Each sub-system maintains its own database and explicitly passes data to other sub-
systems
When large amounts of data need to be shared, the repository model is most
commonly used, as it provides an efficient mechanism for data sharing
Advantages • Components can be independently – they don’t need to be aware of the existence
of other components
• Changes made by one component can be propagated to all others
• All data can be managed consistently (e.g., backups can be performed at the same
time) since it’s stored in a single location
Disadvantages • Failure in the repository can affect the entire system
• Organizing all communication through the repository may be inefficient
• Distributing the repository across multiple computers can also be challenging
Example Fig.
When used • Used when data in a shared databased needs to be accessed from multiple
locations
• Because servers can be replicated, this model is also suitable when the system
experiences variable load
Advantages • The principle advantage of this model is that servers ca be distributed across a
network
• General functionality (e.g., printing service) can be made available to all
clients and doesn’t need to be implemented by every service
When transformations are sequential, it’s called the batch sequential model,
which is widely used in data processing system
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 • The workflow style aligns well with the structure of many business
processes
• Evolution by adding new transformations is straightforward
• It can be implemented as either a sequential or concurrent system
Disadvantages • The data transfer format must be agreed upon by the communicating
transformations
• Each transformation must parse its input and format its output
according to its agreed format
• This adds systems overhead and may make it impossible to reuse
functional transformations that rely on incompatible data structure
4/14/2025 Architectural design Page 32
An example of the pipe & filter architecture used in a
payment system
As a design checklist
E-commerce systems
Reservation systems
Compilers
Command interpreters
Layers include
User communications
Information retrieval
System databases
A code generator that ‘walks’ the syntax tree and generates abstract
machine code
They describe the architecture, explain when it may be used an describe its
advantages and disadvantages
language processing systems are used to translate texts from one language
into another and to try out the instructions specified in the input language
They include a translator and an abstract machine that executes the generated
language