Architectural Design
Architectural Design
Architectural
Design
CSC3324
Dr Houda CHAKIRI
Copyright © 2016, 2011, 2006 Pearson Education, Inc. All Rights Reserved
Learning Objectives
3
The IEEE definition of software
architecture
“Architecture is the
fundamental organization of
a software system embodied
in its components, their
relationships to each other
and to the environment, and
the principles guiding its
design and evolution.”
4
Architectural Design
Architectural design is
concerned with understanding
how a software system should be
organized and designing the
overall structure of that system.
• Stakeholder communication
• Architecture may be used as a focus of discussion by
system stakeholders.
• System analysis
• Means that analysis of whether the system can meet its
non-functional requirements is possible.
• Large-scale reuse
• The architecture may be reusable across a range of systems
• Product-line architectures may be developed.
Notations for Architectural Specifications
•C1: Order Processing System
Architectural •C1 : Product Catalog
•C2 : Online Store •C2: Payment Gateway
complexity
• Complexity in a
system architecture
arises because of the
•C1: Customer
number and the Profile
nature of the Management
relationships •C2: Order
between History
components in that
system. Examples of
•C1: Inventory Management
component •C2: Order Management
relationships:
12
Architectural Modeling Notations
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 non-functional characteristics of the
system.
Architecture Reuse
22
• Nonfunctional product characteristics:
• Security and performance affect all
users. If you get these wrong, your
product is unlikely to be a commercial
success. Some characteristics are
contradictory, so you can only optimize
The the most important.
importance of
architectural
design issues
23
• Product lifetime:
• If you anticipate a long product lifetime,
you will need to create regular product
revisions. You therefore need an
architecture that is evolutive, so that it
can be adapted to accommodate new
The features and technology.
importance of
architectural
design issues
24
• Software reuse:
• You can save a lot of time and effort, if you
can reuse large components from other
The products or open-source software.
However, this constrains your
importance architectural choices because you must
of fit your design around the software that is
being reused.
architectura
l design
issues
25
• Number of users:
• If you are developing consumer software
delivered over the Internet, the number of
users can change very quickly. This can
lead to serious performance degradation
The unless you design your architecture so
importance of that your system can be quickly scaled up
and down.
architectural
design
issues(cont.)
26
• Software compatibility:
• For some products, it is important to
maintain compatibility with other software
so that users can adopt your product and
use data prepared using a different
The system. This may limit architectural
importance of choices, such as the database software
that you can use.
architectural
design issues
(cont.)
27
• Human and organizational factors
• The planned schedule to bring the
product to market
The • The capabilities of your development
team
importance of
• The software development budget.
architectural
design issues
If you choose an architecture that
(cont.) requires your team to learn unfamiliar
technologies, then this may delay the
delivery of your system. There is no
point in creating a “perfect”
architecture that is delivered late if
this means that a competing product
captures the market.
28
Maintainability vs.
Performance
Architectural
Security vs.
design Usability
trade-offs
Availability vs.
Time to market
and cost.
Trade off #1: Maintainability vs
Performance
Maintainability Performance
30
Trade off #2: Security vs Usability
Security Usability
31
Authentication
layers
33
Architectural Design Decisions
Architectural Views
Copyright © 2016, 2011, 2006 Pearson Education, Inc. All Rights Reserved
Architectural Views
Copyright © 2016, 2011, 2006 Pearson Education, Inc. All Rights Reserved
Architectural Patterns
Patterns should include information about when they are and when
the are not useful.
Each layer is an
area of concern
and is
Ideally, components at considered
level X (say) should only separately from
interact with the APIs of other layers.
the components in level
X-1; that is, interactions The
should be between components are
layers and not across independent
layers. and do not
overlap in
functionality. 47
Comparison of Closed
vs. Open Layered
Architecture
• Cross-cutting concerns are concerns that are
systemic. i.e.: they affect the whole system.
• The existence of cross-cutting concerns is the
reason why modifying a system after it has
been designed to improve its security is often
difficult.
Cross-
Cutting
Concerns
Architectural
structures • Distributed Architecture (multiple
deployment units, usually consisting of
services)
50
Client-Server Architecture
52
A Client-Server
Architecture for a
Film Library
The Client–Server Pattern
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 Figure 6.11 is an example of a 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.
Multi-tier client-server
architecture
communicates with clients
using the HTTP protocol. It
delivers web pages to the manages the system
browser for rendering and data and transfers
processes HTTP requests these data to and from
from the client. the system database.
responsible for
application-specific
operations.
55
Application
Architectures
Copyright © 2016, 2011, 2006 Pearson Education, Inc. All Rights Reserved
Application Architectures
Database Platform
Should you use a relational SQL Should you deliver your product
database or an unstructured on a mobile app and/or a web
NOSQL database? platform?
Server
Should you use dedicated in-
house servers or design your
system to run on a public cloud?
If a public cloud, should you use
Amazon, Google, Microsoft, or
some other option?
68
Technology Choices (cont.)
Development Tools
Open Source Do your development tools
Are there suitable open-source embed architectural
components that you could assumptions about the software
incorporate into your products? being developed that limit your
architectural choices?
69
Database
• There are two kinds of database that are now commonly used:
• Relational databases
• NoSQL databases, in which the data has a more flexible, user-
defined organization.
• Relational databases, such as MySQL, are particularly suitable for
situations where you need transaction management, and the data
structures are predictable and simple.
• NoSQL databases, such as MongoDB, are more flexible and
potentially more efficient than relational databases for data analysis.
70
Delivery Platform
71
Server
72
Development tools
73
Open Source
74