Introduction To Software Architecture
Software Architecture

Software Architecture is a set of software structures that describe the
organization of a system — including how it's coded (modules), how it works
at runtime (components), and where it's deployed (hardware/cloud).

Each structure helps different people:

Developers care about module structure (code organization).

System integrators care about components and connectors (how systems
talk).

IT engineers care about deployment (where it runs).
Real-world example like Swiggy (online food delivery app).
1. Module Structure
Focus: Code organization (like packages, classes, files).
Example in Swiggy:
[User App] [API Gateway] [Backend Services]
⇄ ⇄
↓
[Order Service] [Restaurant Service]
⇄
↓
[Payment Service]
2.Components and Connectors
Each box is a component.
Arrows are connectors like REST API, WebSocket, etc.
Real-world example like Swiggy (online food delivery app).
3. Allocation Structure
Focus: Mapping software onto hardware/resources.
Example in Swiggy:
Mobile App → User Device (Android/iOS)
Backend APIs → Cloud Server (AWS/GCP)
Database → Managed DB Service
Image CDN → CloudFront (for food images)
Architectural Patterns
Composition of architeral elements called Architectural Patterns provide
packaged strategies for solving some of the problems facing a system.
An Architectural Patterns determines the elements types and their forms of
interaction used in solving the problem.
Patterns can be characterized according to the type of architectural elements
they use.
Architectural Patterns with real-world examples (like Flipkart)
1. Module Type Pattern
🔹 Layered Architecture – Flipkart
Flipkart Example:
Presentation Layer: User Interface (App or Website)
Business Logic Layer: Cart, Wishlist, Order processing logic
Data Access Layer: APIs for database interactions
Database Layer: Product, user, order data
Architectural Patterns with real-world examples (like Flipkart)
2. Component and Connector Patterns
🔹 Shared Data Pattern – Swiggy (Restaurant & Delivery Coordination)
All services (restaurant listing, delivery allocation, reviews) use a central
database/repository.
Client-Server Pattern – Flipkart or Amazon

Client: Flipkart app or website

Server: Backend server (Node.js, Java) that processes requests
Architectural Patterns with real-world examples (like Flipkart)
3.Allocation Type Patterns
🔹 Multi-Tier Pattern – Swiggy
Swiggy tiers:
Tier 1: UI/Frontend (Android/iOS app)
Tier 2: Application Server (order logic, delivery assignment)
Tier 3: Database (PostgreSQL, DynamoDB)
Structures and Views

A view is a representaion of a coherent set of architectural elements,as
written by and read by system stakeholders.

A structure is the set of elements itself,as they exist in software or hardware.
Views

A view is a representaion of a coherent set of architectural elements,as

written by and read by system stakeholders.

A view shows how a system appears from the perspective of one or more

stakeholders. It focuses on specific aspects of the system, such as structure,

behavior, deployment, or development.

Each view answers questions like:

What components exist and how do they interact? (Logical/Module View)

How does the system behave at runtime? (Process/View)

Where is the system deployed physically? (Deployment View)
Common types of views
View Type Description Stakeholders
Logical View Shows the system’s functional
elements and their relationships.
Often represented with class or
component diagrams.
Designers, developers
Development View Also called Module View, shows
how the system is organized in
the development environment—
modules, packages, libraries.
Developers
Process View Describes runtime behavior,
concurrency, and communication
between processes.
Performance engineers
Physical View Shows the physical deployment
of software artifacts on hardware
nodes.
DevOps, IT engineers
+1. Use Case View Shows end-user functionality
and scenarios through use
cases or user stories.
Customers, testers
Useful Architectural Structures
View Type Software
Structure
Element
Types
Relations 
Quality Attributes
Affected
Module
Structures
Decomposition Module Is a submodule of 
Modifiability
Uses Module Uses(i.e.requires
the correct
presence of)

Subsetability,

extensibility
Layers Layer Requires the
correct presence
of uses the
services of
provides
abstraction to.
Portability,
extensibility
Class Class,
Object
Is an instance
of,shares access
methods of

Modifiability,

extensibility
Data model Data
entity
(one-many) to
(one,many),
Generalizes,
specializers

Modifiability,

performance
Useful Architectural Structures
View Type Software
Structure
Element Types Relations 
Quality
Attributes
Affected
C & C
Structures
Service Service,ESB,registry,
others
Runs
concurrently
with ,may run
concurrently
with,excludes
,precedes
etc.
Interoperability,
Modifiability
Concurrency Processes,threads Can run in
parallel

Performance
Availability
Useful Architectural Structures
View Type Software
Structure
Element Types Relations 
Quality
Attributes
Affected
Allocation
Structures
Deployment Components,hardware
elements
Allocated
to,migrates
to

Performance,
availability,se
curity
Implementation Modules,file structure Stored in 
Development
efficiency
Work assignment Modules,organizational
units
Assigned to Development
efficiency
Quality attributes

In Software Architecture, quality attributes (also
called non-functional requirements) define how
well a system performs under various
conditions.

They are crucial for evaluating the
effectiveness, usability, and reliability of a
system — beyond just its functional behavior.
Quality attributes

1. Performance: Definition

How quickly and efficiently the system responds to inputs and completes tasks under various
conditions.

Examples:Fast search

Response time : Total time to complete the request.

Example:2 seconds per order

Throughput :How much work the system can handle efficiently over time.

Example : 200 orders/min

Latency : Waiting time before the system starts responding.

Example :If it takes 300ms before you see the “Order Confirmed” screen start loading — that’s
latency.
Quality attributes

Resource utilization:Deciding what system resources are given to which software component,
when, and how much.

Example :

Think of a restaurant kitchen:

Head chef (CPU) does heavy tasks.

Helpers (RAM) handle prep work quickly.

Pantry (Disk) stores all ingredients.

Waiters (Network) take orders to and from tables.
Quality attributes

2. Modifiability

Definition:

How easily the system can be changed or updated after deployment.

Examples:

Adding new features

Fixing bugs

Adapting to new requirements

In a food delivery app:

Add a new payment option (e.g., UPI or crypto) without affecting existing modules.

Modify UI for a festival discount without changing backend logic.
Quality attributes

3. Security

Definition:

Protection of system data and operations against unauthorized access, misuse, or attacks.

Examples:

Authentication and authorization

Data encryption

Secure communication (HTTPS)

Audit logs

In a food delivery app:

Only logged-in users can place an order.

Encrypt customer payment data.

Delivery agents should only access their assigned orders.
Quality attributes

4. Usability

Definition:

How easy and efficient it is for users to learn, use, and interact with the system.

Examples:

Intuitive UI/UX

Meaningful error messages

Accessibility support

In a food delivery app:

Simple UI to browse restaurants, track orders.

Easy filters (veg, offers, ratings).

Minimal steps to checkout.

software view and quality attribute of SA

  • 1.
  • 2.
    Software Architecture  Software Architectureis a set of software structures that describe the organization of a system — including how it's coded (modules), how it works at runtime (components), and where it's deployed (hardware/cloud).  Each structure helps different people:  Developers care about module structure (code organization).  System integrators care about components and connectors (how systems talk).  IT engineers care about deployment (where it runs).
  • 3.
    Real-world example likeSwiggy (online food delivery app). 1. Module Structure Focus: Code organization (like packages, classes, files). Example in Swiggy: [User App] [API Gateway] [Backend Services] ⇄ ⇄ ↓ [Order Service] [Restaurant Service] ⇄ ↓ [Payment Service] 2.Components and Connectors Each box is a component. Arrows are connectors like REST API, WebSocket, etc.
  • 4.
    Real-world example likeSwiggy (online food delivery app). 3. Allocation Structure Focus: Mapping software onto hardware/resources. Example in Swiggy: Mobile App → User Device (Android/iOS) Backend APIs → Cloud Server (AWS/GCP) Database → Managed DB Service Image CDN → CloudFront (for food images)
  • 5.
    Architectural Patterns Composition ofarchiteral elements called Architectural Patterns provide packaged strategies for solving some of the problems facing a system. An Architectural Patterns determines the elements types and their forms of interaction used in solving the problem. Patterns can be characterized according to the type of architectural elements they use.
  • 6.
    Architectural Patterns withreal-world examples (like Flipkart) 1. Module Type Pattern 🔹 Layered Architecture – Flipkart Flipkart Example: Presentation Layer: User Interface (App or Website) Business Logic Layer: Cart, Wishlist, Order processing logic Data Access Layer: APIs for database interactions Database Layer: Product, user, order data
  • 7.
    Architectural Patterns withreal-world examples (like Flipkart) 2. Component and Connector Patterns 🔹 Shared Data Pattern – Swiggy (Restaurant & Delivery Coordination) All services (restaurant listing, delivery allocation, reviews) use a central database/repository. Client-Server Pattern – Flipkart or Amazon  Client: Flipkart app or website  Server: Backend server (Node.js, Java) that processes requests
  • 8.
    Architectural Patterns withreal-world examples (like Flipkart) 3.Allocation Type Patterns 🔹 Multi-Tier Pattern – Swiggy Swiggy tiers: Tier 1: UI/Frontend (Android/iOS app) Tier 2: Application Server (order logic, delivery assignment) Tier 3: Database (PostgreSQL, DynamoDB)
  • 9.
    Structures and Views  Aview is a representaion of a coherent set of architectural elements,as written by and read by system stakeholders.  A structure is the set of elements itself,as they exist in software or hardware.
  • 10.
    Views  A view isa representaion of a coherent set of architectural elements,as  written by and read by system stakeholders.  A view shows how a system appears from the perspective of one or more  stakeholders. It focuses on specific aspects of the system, such as structure,  behavior, deployment, or development.  Each view answers questions like:  What components exist and how do they interact? (Logical/Module View)  How does the system behave at runtime? (Process/View)  Where is the system deployed physically? (Deployment View)
  • 11.
    Common types ofviews View Type Description Stakeholders Logical View Shows the system’s functional elements and their relationships. Often represented with class or component diagrams. Designers, developers Development View Also called Module View, shows how the system is organized in the development environment— modules, packages, libraries. Developers Process View Describes runtime behavior, concurrency, and communication between processes. Performance engineers Physical View Shows the physical deployment of software artifacts on hardware nodes. DevOps, IT engineers +1. Use Case View Shows end-user functionality and scenarios through use cases or user stories. Customers, testers
  • 12.
    Useful Architectural Structures ViewType Software Structure Element Types Relations  Quality Attributes Affected Module Structures Decomposition Module Is a submodule of  Modifiability Uses Module Uses(i.e.requires the correct presence of)  Subsetability,  extensibility Layers Layer Requires the correct presence of uses the services of provides abstraction to. Portability, extensibility Class Class, Object Is an instance of,shares access methods of  Modifiability,  extensibility Data model Data entity (one-many) to (one,many), Generalizes, specializers  Modifiability,  performance
  • 13.
    Useful Architectural Structures ViewType Software Structure Element Types Relations  Quality Attributes Affected C & C Structures Service Service,ESB,registry, others Runs concurrently with ,may run concurrently with,excludes ,precedes etc. Interoperability, Modifiability Concurrency Processes,threads Can run in parallel  Performance Availability
  • 14.
    Useful Architectural Structures ViewType Software Structure Element Types Relations  Quality Attributes Affected Allocation Structures Deployment Components,hardware elements Allocated to,migrates to  Performance, availability,se curity Implementation Modules,file structure Stored in  Development efficiency Work assignment Modules,organizational units Assigned to Development efficiency
  • 15.
    Quality attributes  In SoftwareArchitecture, quality attributes (also called non-functional requirements) define how well a system performs under various conditions.  They are crucial for evaluating the effectiveness, usability, and reliability of a system — beyond just its functional behavior.
  • 16.
    Quality attributes  1. Performance:Definition  How quickly and efficiently the system responds to inputs and completes tasks under various conditions.  Examples:Fast search  Response time : Total time to complete the request.  Example:2 seconds per order  Throughput :How much work the system can handle efficiently over time.  Example : 200 orders/min  Latency : Waiting time before the system starts responding.  Example :If it takes 300ms before you see the “Order Confirmed” screen start loading — that’s latency.
  • 17.
    Quality attributes  Resource utilization:Decidingwhat system resources are given to which software component, when, and how much.  Example :  Think of a restaurant kitchen:  Head chef (CPU) does heavy tasks.  Helpers (RAM) handle prep work quickly.  Pantry (Disk) stores all ingredients.  Waiters (Network) take orders to and from tables.
  • 18.
    Quality attributes  2. Modifiability  Definition:  Howeasily the system can be changed or updated after deployment.  Examples:  Adding new features  Fixing bugs  Adapting to new requirements  In a food delivery app:  Add a new payment option (e.g., UPI or crypto) without affecting existing modules.  Modify UI for a festival discount without changing backend logic.
  • 19.
    Quality attributes  3. Security  Definition:  Protectionof system data and operations against unauthorized access, misuse, or attacks.  Examples:  Authentication and authorization  Data encryption  Secure communication (HTTPS)  Audit logs  In a food delivery app:  Only logged-in users can place an order.  Encrypt customer payment data.  Delivery agents should only access their assigned orders.
  • 20.
    Quality attributes  4. Usability  Definition:  Howeasy and efficient it is for users to learn, use, and interact with the system.  Examples:  Intuitive UI/UX  Meaningful error messages  Accessibility support  In a food delivery app:  Simple UI to browse restaurants, track orders.  Easy filters (veg, offers, ratings).  Minimal steps to checkout.