0% found this document useful (0 votes)
36 views27 pages

Lecture - 2 Architectural Style SDA

This document provides an overview of software architecture patterns and styles. It defines the difference between architectural patterns and styles, listing some common patterns such as layered, client-server, and model-view-controller. The document then summarizes several architectural patterns in more detail, explaining their general components and common uses. It concludes with a brief discussion of upcoming topics.

Uploaded by

Umar Maaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views27 pages

Lecture - 2 Architectural Style SDA

This document provides an overview of software architecture patterns and styles. It defines the difference between architectural patterns and styles, listing some common patterns such as layered, client-server, and model-view-controller. The document then summarizes several architectural patterns in more detail, explaining their general components and common uses. It concludes with a brief discussion of upcoming topics.

Uploaded by

Umar Maaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 27

1

Software Architecture and Design


Architecture Pattern/Architecture Styles

Instructor Name: Riaz Ahmad


23.03.2024 Department of Computer Science, COMSATS University Islamabad, Wah Campus, Pakistan
Outline
2

 Introduction to the topic and its importance


 Difference b/w AP and AS?
 various styles available for software architecture
 Summery of the lecture
 What next……..

23.03.2024
3 23.03.2024
4 23.03.2024
Difference between Architectural Pattern and Style
5

An Architectural Style is the application design at the highest level


of abstraction; An Architectural Pattern is a way to implement
an Architectural Style

23.03.2024
Basic Concepts---- must have a grasp
6

Just like sketch of a building helps constructor to correctly


construct the building
software architecture helps software developer to develop the
software properly.

23.03.2024
Basic Concepts---- must have a grasp
7

An architectural pattern is a general, reusable solution to a commonly


occurring problem in software architecture within a given context.
Architectural patterns are like software design pattern but have a broader
scope.

23.03.2024
General ingredient of Architectural Patterns?
8

1. A set of components (e.g. a database, computational modules) that will perform a


function required by the system.
2. The set of connectors will help in coordination, communication, and cooperation
between the components.
3. Conditions that how components can be integrated to form the system.
4. Semantic models that help the designer to understand the overall properties of the
system.
 How large enterprise scale systems are designed? Before major software development

starts, we must choose a suitable architecture that will provide us with the desired
functionality and quality attributes. Hence, we should understand different architectures,
before applying them to our design.
23.03.2024
software architecture
9

 There are various styles available for software architecture.


1-Layered pattern 2-Client-server pattern
3-Master-slave pattern 4-Pipe-filter pattern
5-Broker pattern 6-Peer-to-peer pattern
7-Event-bus pattern 8-Model-view-controller pattern
9-Blackboard pattern 10-Interpreter pattern

23.03.2024
Layered pattern
10

 This pattern can be used to structure programs that can be decomposed into groups of
subtasks, each of which is at a particular level of abstraction. Each layer provides
services to the next higher layer.
 The most found 4 layers of a general information system are as follows.
• Presentation layer (also known as UI layer)
• Application layer (also known as service layer)
• Business logic layer (also known as domain layer)
• Data access layer (also known as persistence layer)
 Usage
• General desktop applications.
• E commerce web applications.
23.03.2024
Client-server pattern

11

 This pattern consists of two parties; a server and multiple clients.


 The server component will provide services to multiple client components.

 Clients request services from the server and the server provides relevant

services to those clients. Furthermore, the server continues to listen to client


requests.
 Usage

 Online applications such as email, document

sharing and banking.

23.03.2024
Master-slave pattern
12

This pattern consists of two parties;


master and slaves.
The master component distributes the work among
identical slave components and computes a result from the results
which the slaves return.
Usage
In database replication, the master database is regarded as the authoritative source, and
the slave databases are synchronized to it.
Peripherals connected to a bus in a computer system (master and slave drives).

23.03.2024
Pipe-Filter pattern
13

This pattern can be used to structure systems which produce and process a
stream of data.
Each processing step is enclosed within a filter component. Data to be
processed is passed through pipes. These pipes can be used for buffering
or for synchronization purposes.
Usage
 Compilers. The consecutive filters perform lexical analysis, parsing,
semantic analysis, and code generation.
 Workflows in bioinformatics.

23.03.2024
Broker pattern

14

This pattern is used to structure distributed systems with decoupled components.


These components can interact with each other by remote service invocations.
A broker component is responsible for the coordination of communication
among components.
Servers publish their capabilities

(services and characteristics) to a broker. Clients request a service from the broker,
and the broker then redirects the client to a suitable service from its registry.
Usage
 Message broker software such as
 Apache ActiveMQ, Apache Kafka, RabbitMQ and JBoss Messaging.

23.03.2024
15 23.03.2024
Peer-to-peer pattern

16

In this pattern, individual components are known as peers. Peers may


function both as a client, requesting services from other peers, and as
a server, providing services to other peers. A peer may act as a client or as
a server or as both, and it can change its role dynamically with time.
Usage
 File-sharing networks such as Gnutella and G2)
 Multimedia protocols such as P2PTV and PDTP.
 Cryptocurrency-based products such as
Bitcoin and Blockchain

23.03.2024
Event-bus pattern

17

This pattern primarily deals with events and has 4 major components;
event source, event listener, channel and event bus. Sources publish
messages to channels on an event bus. Listeners subscribe to channels.
Listeners are notified of messages that are published to a channel to which
they have subscribed before.
Usage
 Android development
 Notification services

23.03.2024
Model-view-controller pattern

18

This pattern, also known as MVC pattern, divides an interactive application in to


3 parts as,
model — contains the core functionality and data
view — displays the information to the user (more than one view may be
defined)
controller — handles the input from the user
This is done to separate internal representations of information from the way's
information is presented to, and accepted from, the user. It decouples
components and allows efficient code reuse.
Usage
Architecture for World Wide Web applications in major programming languages.
Web frameworks such as Django and Rails.

23.03.2024
19 23.03.2024
Blackboard pattern

20

noThis pattern is useful
deterministic for strategies
solution problems are for known.
which
The blackboard pattern consists of 3 main
components.
 blackboard
containing — a structured
objects from the global memory
solution space
 knowledge
with their source
own — specialized modules
representation
1. control component
configures and — selects,
executes
modules.
have All the
access tomay components
the produce
blackboard.
Components
data objects that are added new
to the
blackboard.
particular Components
kinds of data on look
the for
blackboard
by pattern and may find
matching source. these
with the
 Usage existing knowledge
Speech
and recognition,
tracking, Protein Vehicle
structure identification
identification, Sonar signals interpretation.
23.03.2024
21 23.03.2024
Interpreter pattern

22

This pattern is used for designing a component that interprets programs written in a
dedicated language. It mainly specifies how to evaluate lines of programs, known as
sentences or expressions written in a particular language. The basic idea is to have a
class for each symbol of the language.
Usage
 Database query languages such as SQL.

 Languages used to describe communication protocols.

23.03.2024
23 23.03.2024
24 23.03.2024
25 23.03.2024
26 23.03.2024
27

THANK YOU

23.03.2024

You might also like