4. Software Architecture
4. Software Architecture
An Awesome Introduction to
System Analysis and Design
© BIS301 2023
Software architecture
• the technologies that you use to build the software.The architecture of a software
product affects its performance, usability, security, reliability and maintainability.
S1 S2 S3 S4 S5 S6
Component 1 Component 2
• Programmers are more likely to make mistakes and introduce bugs and security
vulnerabilities when they are modifying or extending a complex system..
Responsiveness
Does the system return results to users in a reasonable time?
Reliability
Do the system features behave as expected by both developers and users?
Availability
Can the system deliver its services when requested by users?
Security
Does the system protect itself and users’ data from unauthorized attacks and
intrusions?
Usability
Can system users access the features that they need and use them quickly and
without errors?
Maintainability
Can the system be readily updated and new features added without undue costs?
Resilience
Can the system continue to deliver user services in the event of partial failure or
external attack?
Unfortunately (for the Empire), the rebels managed to breach their security. They
stole the plans for the Death Star, an event which underpins the whole Star Wars
saga. In trying to stop them, the Empire destroyed their entire archive of system
documentation with who knows what resultant costs. Had the Empire chosen a
distributed security architecture, with different parts of the Death Star plans
stored in different locations, then stealing the plans would have been more
difficult. The rebels would have had to breach security in all locations to steal the
complete Death Star blueprints.
ﻣش ﻣﮭم ﺑﺎﻗﻲ اﻟﺻﻔﺣﺔ
• Figure 4.2 shows a system with two components (C1 and C2) that share
a common database.
• Assume C1 runs slowly because it has to reorganize the information in the
database before using it.
• The only way to make C1 faster might be to change the database. This means
that C2 also has to be changed, which may, potentially, affect its response time.
User interface
C1 C2
Shared database
User interface
C1 C2
C1 database C2 database
C3
Database reconciliation
Software Architecture © BIS301 2023 13
Figure 4.4 Issues that influence architectural decisions
Nonfunctional
product characteristics
Software Product
compatibility lifetime
Architectural
influences
Number of Software
users reuse
IP authentication
Application authentication
Feature authentication
Encryption
• Many users find this irritating and often look for work-arounds so that they do
not have to re-authenticate to access system features or data.
Web browser
Information retrieval
Document Rights
Search Payments Accounting
retrieval management
Document index
Index Index
Index querying
management creation
Basic services
Databases
C1
C2 C1
C1 C2
C1
calls
C2
C1 shares-data-with C2
C1 data C2
Separation of concerns
Organize your architecture
into components that focus on
a single concern
Design
guidelines
• Within each layer, the components are independent and do not overlap
in functionality. seperation of concern
• The lower layers include components that provide general functionality so there
is no need to replicate this in the components in a higher level. implement ones
• Cross-cutting concerns are concerns that are systemic, that is, they
affect the whole system.
• In a layered architecture, cross-cutting concerns affect all layers in the
system as well as the way in which people use the system.
• Cross-cutting concerns are completely different from the functional
concerns represented by layers in a software architecture.
• Every layer has to take them into account and there are inevitably
interactions between the layers because of these concerns.
• 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.
ده ﻷﻧﮭﺎ ﺑﺗﺄﺛر ﻋﻠﻰ ﻛل اﻟطﺑﻘﺎت وﺑﺎﻟﺗﺎﻟﻲ ﻟو ﺻﻣﻣت وﻋﻣﻠت اﻟﺑرﻧﺎﻣﺞ وﺟﯾت ﻋﺎﯾز ازود اﻻﻣﺎن ھﯾﺑﻘﻰ
ﺻﻌب ﺟدا ﻻﻧﮫ ﺑﯾﺄﺛر ﻋﻠﻰ ﻛل اﻟطﺑﻘﺎت طﺑﻌﺎ
User interface
Application
Infrastructure
Operating system
Hardware
Security architecture
Different technologies are used in different layers, such as an SQL database or a
Firefox browser. Attackers can try to use of vulnerabilities in these technologies
to gain access.
Consequently, you need protection from attacks at each layer as well as
protection, at lower layers in the system, from successful attacks that have
occurred at higher-level layers.
By distributing security across the layers, your system is more resilient to attacks
and software failure (remember the Rogue One example earlier in the chapter).
Application-specific functionality
Application-specific functionality
An ‘application’ layer that provides functionality of the application. Sometimes, this
may be expanded into more than one layer.
Replaceability
It should be possible for users to replace applications in the system with
alternatives and to add new applications. Consequently, the list of applications
included should not be hard-wired into the system.
Extensibility
It should be possible for users or system administrators to create their own
versions of the system, which may extend or limit the ’standard’ system.
Age-appropriate
Alternative user interfaces should be supported so that age-appropriate
interfaces for students at different levels can be created.
Programmability
It should be easy for users to create their own applications by linking existing
applications in the system.
Minimum work
Users who do not wish to change the system should not have to do extra work so
that other users can make changes.
• Because the potential system users spanned an age range from 3 to 18, we
needed to provide age-appropriate user interfaces and to make it easy to choose
an interface (principle (3)).
• Principle (4) also contributes to system adaptability and principle (5) was included
to ensure that this adaptability did not adversely affect users who did not require
it. minimum work
ﻟو ﻋﻣﻠت ﺣﺎﺟﺔ ﻋﻧدي ﻣﺗﺄﺛرش ﻋﻠﻰ ﻏﯾري
• Independent These services do not use any shared system services or databases
and they are unaware of any other services in the system. They can be replaced by
any other comparable service.
Configuration services
Group Application Security User interface Setup
configuration configuration configuration configuration service
Application services
Archive access Word processor Video conf. Email and User installed
Blog Wiki Spreadsheet Presentation Drawing messaging applications
Integrated services
Client 1
request
response
request
Client 2
response
request
Client 3
response
request
Servers
CLIENT
Browser
User changes
Controller View
Model
SERVER
Client 1
Client 2
Application Database
Web server
server server
Client 3
Client ...
s1
Client 1
s2
Client 2 s3
Service
Web server gateway
s4
Client 3
s5
Client ... s6
Services
• Change frequency
• If you anticipate that system components will be regularly changed or replaced,
then isolating these components as separate services simplifies those changes.
Database
Should you use a relational SQL database or an unstructured NOSQL database?
Platform
Should you deliver your product on a mobile app and/or a web 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?
Open source
Are there suitable open-source components that you could incorporate into your
products?
Development tools
Do your development tools embed architectural assumptions about the software
being developed that limit your architectural choices?
• There are two kinds of database that are now commonly used:
• Relational databases, where the data is organised into structured tables
• A key decision that you have to make is whether to design your system
to run on customer servers or to run on the cloud.
• For consumer products that are not simply mobile apps I think it almost
always makes sense to develop for the cloud.
• For business products, it is a more difficult decision.
• Some businesses are concerned about cloud security and prefer to run their
systems on in-house servers. They may have a predictable pattern of system
usage so there is less need to design your system to cope with large changes in
demand.
• An important choice you have to make if you are running your software
on the cloud is which cloud provider to use.
• Open source software is software that is available freely, which you can
change and modify as you wish.
• The advantage is that you can reuse rather than implement new software, which
reduces development costs and time to market.
• The development technology that you use may also have an indirect
influence on the system architecture.
• Developers usually favour architectural choices that use familiar technologies
that they understand. For example, if your team have a lot of experience of
relational databases, they may argue for this instead of a NoSQL database.