UCS2703 : Software Architecture
Unit-II
Architectural Styles
1
Session Meta Data
Prepared By : Swarnalakshmi Ravi, Associate
Professor
Date : 25-Jul-2024
2
Session Objectives
– The fundamentals of architectural styles and its evolution
– The details of architectural styles, views and patterns
– The comparison of various architectural styles
– The industry applications of evolving modern architectural
styles
3
Session Outcomes
• At the end of this unit, participants will be able to
– Understand the fundamentals of architectural styles and its
evolution
– Understand in depth various architectural styles, views and
patterns
– Knowledge on comparison of various architectural styles
– Knowledge on the industry applications using modern
architectural styles
4
Waterfall model- SDLC- Imaginary representation
Evolution of
SW. Archi
styles
Waterfall model- SDLC- at time tn….Completion stage of
project
Evolution of
SW. Archi
styles
Agile model- SDLC- at time tn….Completion stage of
project
Evolution of
SW. Archi
styles
Evolution of
SW. Archi
styles and
how diff
from
patterns
Pipes and Filters Architectural style
Unit 2- In a pipe and filter style , each component has a set of inputs and a
Architectura set of outputs
l Styles Pipes-> Connectors, Filters-> Components
Filters must be independent entities: in particular, they should not
share state with other filters
Common specializations of this style include pipelines, which restrict
the topologies to linear sequences as shown
• Other types are bounded pipes, which restrict the amount of data
that can reside on a pipe; and
• typed pipes, which require that the data passed between two filters
Pipes and Filters Advantages:
Unit 2- They allow the designer to understand the overall input/output
Architectura behavior of a system as a simple composition of the behaviors of the
individual filters
l Styles they support reuse: any two filters can be hooked together, provided
they agree on the data that is being transmitted between them.
systems can be easily maintained and enhanced: new filters can be
added to existing systems and old filters can be replaced by improved
ones.
they permit certain kinds of specialized analysis, such as throughput
and deadlock analysis during concurrent execution
Pipes and Filters :
Unit 2- There are three ways to make the data flow:
Architectura • Push only (Write only) A data source may push data in a
l Styles downstream. A filter may push data in a downstream.
• Pull only (Read only) A data sink may pull data from an upstream.
A filter may pull data from an upstream.
• Pull/Push (Read/Write) A filter may pull data from an upstream and
push transformed data in a downstream.
Pipes and Filters :
Unit 2- There are two types of filters: active and passive.
Architectura • An active filter pulls in data and pushes out the transformed data
(pull/push); it works with a passive pipe that provides read/write
l Styles mechanisms for pulling and pushing. The pipe and filter mechanism in
Unix adopts this mode.
• A passive filter lets connected pipes push data in and pull data out.
It works with active pipes that pull data out from a filter and push
data into the next filter.
The filter must provide the read/write mechanisms in this case. This is
very similar to data flow architecture.
The Java PipedWriter and PipedReader classes work together to
Unit 2- Data Abstraction Types and Object Orientation:
Architectura Data representations and their associated primitive operations are
l Styles encapsulated in an abstract data type [aka object]
Objects interact through function and procedure invocations.
Two important aspects of this style are
(a) that an object is responsible for preserving the integrity of its
representation (usually by maintaining some invariant over it), and
(b)that the representation is hidden from other objects
Data Abstraction Types Advantages:
Because an object hides its representation from its clients, it is
possible to change the implementation without affecting those clients.
Additionally, the bundling of a set of accessing routines with the data
they manipulate allows designers to decompose problems into
Unit 2- collections of interacting agents
Architectura Data Abstraction Types Disadvantages:
l Styles Unlike the pipe and filter style, here in order for one object to interact
with another (via procedure call) it must know the identity of that
other object. Ex: web services, REST
whenever the identity of an object changes it is necessary to modify
all other objects that explicitly invoke it
What if we use modules? need to change the “import” list of every
module that uses the changed module that’s it
Data Repositories:
A central data structure represents the current state, and a collection
of independent components operate on the central data store.
Interactions between the repository and its external components can
vary significantly between systems.
Unit 2- The knowledge sources: separate, independent parcels of
Architectura application
dependent knowledge.
l Styles Interaction among knowledge sources takes place solely through the
blackboard.
The blackboard data structure: problem-solving state data,
organized into an application-dependent hierarchy.
Knowledge sources make changes to the blackboard that lead
incrementally to a solution to the problem
Data Repositories:
Unit 2-
Architectura
l Styles
Data Repositories:
A data repository is Suitable for large, complex information systems
where many software component clients need to access them in
different ways.
Requires data transactions to drive the control flow of computation
Benefits:
Unit 2- • Data integrity: easy to back up and restore
• System scalability and reusability of agents: easy to add new
Architectura software components because they do not have direct communication
l Styles with each other
• Reduces the overhead of transient data between software
components(class and sub class modularization as seen in prev ex)
Limitations:
• Data store reliability and availability are important issues. [cost]
*Centralized repository is vulnerable to failure compared to distributed
repository with data replication.
• High dependency between data structure of data store and its agents.
Changes in data structure have significant impacts on its agents.
* Data evolution is more difficult and expensive.
Blackboard architecture
Name came from the thought of schools where Students and teachers
play the role of agents to contribute to the problem solving using a
black board.
The connections between the blackboard subsystem and knowledge
Unit 2- sources are basically implicit invocations from the blackboard to
specific knowledge sources, which are registered with the blackboard
Architectura in advance.
l Styles Data changes in the blackboard trigger one or more matched
knowledge source to continue processing.
Data changes may be caused by new deduced information or
hypotheses results by some knowledge sources.
This connection can be implemented in publish/subscribe mode
D C
Unit 2-
Architectura
l Styles
Table driven Interpreters:
An interpreter includes the pseudo-program being interpreted and the
interpretation engine itself.
The pseudo-program includes the program itself and the interpreter’s
analog of its execution state (activation record).
Unit 2- The interpretation engine includes both the definition of the
Architectura interpreter and the current state of its execution
l Styles
Table driven Interpreters:
Interpreters are commonly used to build virtual machines
-that close the gap between the computing engine
-expected by the semantics of the program and
Unit 2- -the computing engine available in hardware
Architectura
l Styles Thus, an interpreter has four components:
an interpretation engine to do the work,
a memory that contains the pseudo-code to be interpreted,
a representation of the control state of the interpretation engine, and
a representation of the current state of the program being simulated.
Distributed Processes:
Distributed systems have developed a number of common
organizations for multi-process systems
Some can be characterized primarily by their topological features,
such as ring and star organizations.
Unit 2- Others are better characterized in terms of the kinds of inter-process
Architectura protocols that are used for communication Ex: Heartbeat
algorithms
l Styles One common form of distributed system architecture is a “client-
server” organization
Springer journal-- Heartbeat algorithm application
for any process in a network that initially only knows its
neighbours, it is possible to get to know the entire network
graph by network-wide message passing. For this purpose,
the concept of heartbeat algorithms is developed.
Distributed Processes - Ex: Heartbeat algorithms
There are two different algorithms that are commonly referred to as
the "heartbeat algorithm".
One algorithm uses the FIFO nature of the signals sent across the
network to ensure that all messages have been received and that
Unit 2- events can be properly ordered.
Architectura The other algorithm is used in cardiology and shows normal ejection
fractions in the first column, heart failure in the second column, and
l Styles arrhythmia in the third column.
Unit 2-
Architectura
l Styles
Main program/subroutine organizations
For languages without support for modularization this often results in
a system organized around a main program and a set of subroutines.
The main program acts as the driver for the subroutines,
Unit 2- typically providing a control loop for sequencing through the
subroutines in some order
Architectura
l Styles State transition systems:
These systems are defined in terms a set of states and a set of named
transitions that move a system from one state to another
A common organization for many reactive systems is the state
transition system
Ex: blockchain….. Revoke the entire transaction, if any single node
fails
Fun Zone
S - - R - - - - - E
FIND.MISSIN -NT---R--E-
G BL---B-A--
-ONC-R-E-T
F I - - E -
1. Pipe-and-filter is one of the architecture styles.
a. True b. False
2. Software architecture design involves many
LEARNING software design methodologies , patterns and
ZONE architecture styles
a. True b. False
3. Software architecture is only a static software
structure description.
a. True b. False
4. Architecture styles contribute to software quality
attributes.
a. True b. False
5. Software quality attributes must satisfy functional
requirements.
a. True b. False
Domain-specific software architectures
These architectures provide an organizational structure tailored to a
family of applications, such as avionics, command and control, or
vehicle management systems
Ex: TCS Digifleet for logistics and supply chain
Unit 2- In many cases the architecture is sufficiently constrained that an
Architectura executable system can be generated automatically or
l Styles semi-automatically from the architectural description itself
Process Control Systems
Systems intended to provide dynamic control of a physical
environment are often organized as process control systems
These systems are roughly characterized as a feedback loop in which
inputs from sensors are used by the process control system [Analogy:
Reinforcement ML]
Process Control Systems
A process control system must have the following process control data:
• Controlled variable: a target -controlled variable such as speed in a
cruise control system or the temperature in an auto H/A system.
It has a set point goal to reach.
Unit 2- The controlled variable data should be measured by sensors as a
Architectura feedback reference to recalculate manipulated variables.
l Styles • Input variable: a measured input data such as the temperature of
return air in a temperature control system.
• Manipulated variable: can be adjusted by the controller.
Ex: In a power plant, controlled variable- oxygen , raw material supply
Input variable- raw materials
Manipulated variable- Valve turn On/Off to regulate oxygen supply
Applications in today’s context: Digital Twin, Smart Manufacturing (IoT),
Cyber Physical Systems
Heterogenous architectures
There are different ways in which architectural styles can be
combined. One way is through hierarchy.
A component of a system organized in one architectural style may
have an internal structure that is developed a completely different
Unit 2- style.
Architectura A second way for styles to be combined is to permit a single
component to use a mixture of architectural connectors.
l Styles For example, a component might access a repository through part of
its interface, but interact through pipes with other components in a
system, and accept control information through another part of its
interface
Inference: Not necessary that every system should have
exactly one style or architectural pattern. Combo works
UML- Unified Modeling Language
Unit 2-
Architectura
l Styles
UML- Unified Modeling Language
Unit 2-
Architectura
l Styles
UML- Class diagram- Structural
Unit 2-
Architectura
l Styles
Draw class diagram for hospital mgt. (components to class-
conversion, Structural)
Unit 2-
Architectura
l Styles
UML- Use case diagram for shopping - Behavioral
Unit 2-
Architectura
l Styles
UML- Class diagram for School admission - Behavioral
Unit 2-
Architectura
l Styles
Draw component diagram for airport mgt. (use case to
components conversion)
Unit 2-
Architectura
l Styles
Activity Diagram [Actions-Verbs]
Unit 2-
Architectura
l Styles
Sequence Diagram [particular order]
Unit 2-
Architectura
l Styles
State Diagram [current status]
Unit 2-
Architectura
l Styles
Interaction Diagram [coordination]
Unit 2-
Architectura
l Styles
Communication Diagram [similar to sequence
diagram, in the way it has to pass on messages]
Unit 2-
Architectura
l Styles
Timing Diagram
Unit 2-
Architectura It combines the state diagram and time sequences to show the
l Styles dynamic view of state change caused by external events over
time.
It is often used in time-critical systems such as real-time
operating systems, embedded system designs, etc.
Above ex: Airlines ticket sales
[Cyclicality, Seasonality, Spikes …]
Distributed Architecture
Unit 2-
Architectura
l Styles
Grid Architecture- a special type of distributed or shared
architecture
Unit 2-
Architectura
l Styles
Network based Architecture [REST]
Unit 2-
Architectura
l Styles
Network based Architecture [REST]
Unit 2-
Architectura
l Styles
Peer to Peer architecture ex: Skype P2P , Zoom CS
Unit 2-
Architectura
l Styles
Dear Kursi
Fun Zone
One who
loses will
enact as per
chit
P2P- Make skype call to all active users in your
contact
Waterfall model
Architectural style
Chit
Table driven interpreters
Heartbeat Algorithm
Class diagram
Service Oriented Architecture (SOA) and Web
Services
Unit 2-
Architectura
l Styles
SPA-Architecture for Robotics [Domain Specific]
Unit 2-
Architectura
l Styles
Unit 2-
Architectura
l Styles
AWS
Lambda,
Pipelines
Unit 2-
Architectura
l Styles
Hadoop
Neo4j Graphical Database and Knowledge
Graphs
Unit 2-
Architectura
l Styles
Knowledge
Graphs
Unit 2-
Architectura
l Styles
Dataiku
Unit 2-
Architectura
l Styles
Dataiku
We learnt through the games
Missing letters… find it
True or False
End of Unit- Do it Yourself
2 Musical chair and chit enacting
Modern software architecture prevailing in the
industries