0% found this document useful (0 votes)
6 views

Individual_Assignment

sad

Uploaded by

Hana Yaregal
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Individual_Assignment

sad

Uploaded by

Hana Yaregal
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 24

Software architecture and design individual assignment

Write the difference between Architecture pattern and


Design pattern?
A) What is Architecture Pattern?

• Software architecture is like the blueprint for


building software, showing how different parts fit
together and interact. It helps the development
team understand how to build the software
according to customer requirements. There are
many ways to organize these parts, called software
architecture patterns.
• These patterns have been tested and proven to
solve different problems by arranging components in
specific ways.
• Purpose: Organize the structure and behavior of
the system to meet business and technical
requirements.

1 | Page
Software architecture and design individual assignment

Types of Architecture Pattern


1. Layered Architecture Pattern
S As the name suggests, components(code) in this
pattern are separated into layers of subtasks and they
are arranged one above another.
S Each layer has unique tasks to do and all the layers are
independent of one another.
S Since each layer is independent, one can modify the
code inside a layer without affecting others.
S It is the most commonly used pattern for designing the
majority of software.
S This layer is also known as 'N-tier architecture'.

❖ Basically, this pattern has 4 layers.


1. Presentation layer: The user interface layer where
we see and enter data into an application.)
2. Business layer: This layer is responsible for executing
business logic as per the request.)
3. Application layer: This layer acts as a medium for
communication between the 'presentation layer' and
'data layer'.

2 | Page
Software architecture and design individual assignment

4. Data layer: This layer has a database for


managing data.)

Advantages:
1. Scalability: Individual layers in the architecture can
be scaled independently to meet performance needs.
2. Flexibility: Different technologies can be used within
each layer without affecting others.
3. Maintainability: Changes in one layer do not
necessarily impact other layers, thus simplifying the
maintenance.

Disadvantages:
1. Complexity: Adding more layers to the
architecture can make the system more complex and
difficult to manage.
2. Performance Overhead: Multiple layers can
introduce latency due to additional communication
between the layers.

3 | Page
Software architecture and design individual assignment

3. Strict Layer Separation: Strict layer separation


can sometimes lead to inefficiencies and
increased development effort.

2. Client-Server Architecture Pattern


❖The client-server pattern has two major entities.
S They are a server and multiple clients.
S Here the server has resources (data, files or services)
and a client requests the server for a particular resource.
Then the server processes the request and responds
back accordingly.

Advantages:
1. Centralized Management: Servers can centrally
manage resources, data, and security policies, thus
simplifying the maintenance.
2. Scalability: Servers can be scaled up to handle
increased client requests.
3. Security: Security measures such as access controls,
data encryption can be implemented in a better way due
to centralized controls.

4 | Page
Software architecture and design individual assignment

Disadvantages:
1. Single Point of Failure: Due to centralized server,
if server fails clients lose access to services, leading
loss of productivity.
2. Costly: Setting up and maintaining servers can be
expensive due to hardware, software, and
administrative costs.
3. Complexity: Designing and managing a client-
server architecture can be complex.

3. Event-Driven Architecture Pattern


S Event-Driven Architecture is an agile approach in which
services (operations) of the software are triggered by
events.
S When a user takes action in the application built using
the EDA approach, a state change happens and a
reaction is generated that is called an event.
Example:
A new user fills the signup form and clicks the signup
button on Facebook and then a FB account is created for
him, which is an event.

5 | Page
Software architecture and design individual assignment

Advantages:
1. Scalability: System can scale horizontally by
adding more consumers.
2. Real-time Processing: This enables real-time
processing and immediate response to events.
3. Flexibility: New event consumers can be added
without modifying existing components.

Disadvantages:
1. Complexity: The architecture can be complex to
design, implement, and debug.
2. Complex Testing: Testing event-driven systems
can be complicated compared to synchronous
systems.
3. Reliability: Ensuring reliability requires additional
mechanisms to handle failed events.

4. Microkernel Architecture Pattern


❖ Microkernel pattern has two major components. They
are a core system and plug-in modules.
. The core system handles the fundamental and minimal
operations of the application.
6 | Page
Software architecture and design individual assignment

. The plug-in modules handle the extended


functionalities (like extra features) and customized
processing.
Let's imagine, you have successfully built a chat
application. And the basic functionality of the app is
that you can text with people across the world
without an internet connection. After some time,
you would like to add a voice messaging feature to
the application, then you are adding the feature
successfully. You can add that feature to the already
developed application because the microkernel
pattern facilitates you to add features as plug-ins.

Advantages:
1. Flexibility: New functionalities can be added easily
through plug-ins.
2. Scalability: The system can scale by adding more
plug-ins to handle more tasks.
3. Maintainability: Plug-ins are developed and tested
independently which makes maintenance easier.

7 | Page
Software architecture and design individual assignment

Disadvantages:
1. Complex Communication: Managing
communication between the core systems and plug-
ins can be complex.
2. Lack Built-in Functionalities: Due to minimalistic
design the basic functionalities are absent that are
common in monolithic architectures.
3. Complex Design: Designing the microkernel and
its communication mechanisms can be challenging.

5. Microservices Architecture Pattern


S The collection of small services that are combined to
form the actual application is the concept of
microservices pattern.
S Instead of building a bigger application, small programs
are built for every service (function) of an application
independently. And those small programs are bundled
together to be a full-fledged application.
S So, adding new features and modifying existing
microservices without affecting other microservices are
no longer a challenge when an application is built in a
microservices pattern.

8 | Page
Software architecture and design individual assignment

S Modules in the application of microservices patterns


are loosely coupled. So, they are easily
understandable, modifiable and scalable.

Advantages:
1. Scalability: Each service can be scaled
independently based on demand.
2. Faster Delivery: Independent services allow teams
to develop, test, and deploy features faster.
3. Easier Maintenance: Services can be updated and
maintained independently.

Disadvantages:
1. Complex Management: Managing multiple services
requires robust monitoring and management tools.
2. Network Congestion: Increased network traffic
between services can lead to congestion and overhead.
3. Security: Securing multiple services and their
communication increases the probability of attack.

9 | Page
Software architecture and design individual assignment

6. Space-Based Architecture Pattern


S Space-Based Architecture Pattern is also known as
Cloud-Based or Grid-Based Architecture Pattern.
S It is designed to address the scalability issues
associated with large-scale and high-traffic applications.
S This pattern is built around the concept of shared
memory space that is accessed by multiple nodes.

Advantages:
1. Scalability: The system can be easily scaled
horizontally by adding more processing units.
2. Performance: In-memory data grids reduce the data
access latency.
3. Flexibility: Modular components allow for flexible
deployment.

10 | Page
Software architecture and design individual assignment

Disadvantages:
1. Complexity: Designing and managing distributed
system is complex.
2. Cost: The infrastructure for space-based
architecture pattern requires multiple servers and
advanced middleware, which can be expensive.
3. Network Latency: Communication between
distributed components can introduce network
latency.

7. Master-Slave Architecture Pattern


S The Master-Slave Architecture Pattern is also known
as Primary-Secondary Architecture.
S It involves a single master component and that
controls multiple slave components.
S The master components assign tasks to slave
components and the slave components report the
results of task execution back to the master.
S This is often used for parallel processing and load
distribution.

11 | Page
Software architecture and design individual assignment

Advantages:
1. Scalability: The system can scale horizontally by
adding more slave units to handle increased load.
2. Fault Tolerance: If slave fails, then the master can
reassign the tasks to some another slave. thus
enhancing the fault tolerance.
3. Performance: Parallel execution of tasks can
improve the performance of the system.

Disadvantages:
1. Single Point of Failure: The master component is a
single point of failure. If the master fails then the entire
system can collapse.
2. Complex Communication: The communication
overhead between master and slave can be significant
especially in large systems.
3. Latency: Systems' responsiveness can be affected by
the latency introduced by master-slave communication.

12 | Page
Software architecture and design individual assignment

8. Pipe-Filter Architecture Pattern


S Pipe-Filter Architecture Pattern structures a system
around a series of processing elements called filters that
are connected by pipes.
S Each filter processes data and passes it to the next
filter via pipe.

Advantages:
1. Reusability: Filters can be reused in different
pipelines or applications.
2. Scalability: Additional filters can be added to extend
the functionality to the pipeline.
3. Parallelism: Filters can be executed in parallel if they
are stateless, thus improving performance.

Disadvantages:
1. Debugging Difficulty: Identifying and debugging
issues are difficult in long pipelines.
2. Data Format constraints: Filters must agree on
the data format, requiring careful design and
standardization.

13 | Page
Software architecture and design individual assignment

3. Latency: Data must be passed through


multiple filters, which can introduce latency.

9. Broker Architecture Pattern


S The Broker architecture pattern is designed to
manage and facilitate communication between
decoupled components in a distributed system.
S It involves a broker that acts as an intermediary to
route the requests to the appropriate server.

Advantages:
1. Scalability: Brokers support horizontal scaling by
adding more servers to handle increased load.
2. Flexibility: New servers can be added and the
existing ones can be removed or modified without
impacting the entire system.
3. Fault Tolerance: If a server fails, then broker can
route the request to another server.

14 | Page
Software architecture and design individual assignment

Disadvantages:
1. Complex Implementation: Implementing a broker
requires robust management of routing and load
balancing, thus make system more complex.
2. Single Point of Failure: If broker is not designed
with failover mechanisms, then it can become a
single point of failure.
3. Security Risks: Securing broker component is
important to prevent potential vulnerabilities.

10. Peer-to-Peer Architecture Pattern


S The Peer-to-Peer (P2P) architecture pattern is a
decentralized network model where each node, known
as a peer, acts as both a client and a server.
S There is no central authority or single point of control
in P2P architecture pattern.
S Peers can share resources, data, and services directly
with each other.

15 | Page
Software architecture and design individual assignment

Advantages:
1. Scalability: The network can scale easily as more
peers join.
2. Fault Tolerance: As data is replicated across
multiple peers, this results in system being resilient
to failures.
3. Cost Efficiency: There is no need for centralized
servers, thus reducing the infrastructure cost.

Disadvantages:
1. Security Risks: Decentralized nature of the
architecture makes it difficult to enforce security
policies.
2. Data Consistency: Ensuring data consistency across
peers can be challenging.
3. Complex Management: Managing a decentralized
network with numerous independent peers can be
complex.

16 | Page
Software architecture and design individual assignment

Conclusion:
❖software architecture patterns
S are essential for designing software that meets specific
needs and challenges.
S are a specific, reusable solution to a common problem
or design issue in software architecture.
S are seen as commonality at higher level than design
patterns.
S are high-level strategies that concerns large-scale
components, the global properties and mechanisms
of a system.

> The Layered Pattern is great for e-commerce sites


with its clear separation of tasks.
> The Client-Server Pattern works well for centralized
resources like email and banking systems.
> The Event-Driven Pattern is perfect for applications
that react to user actions.
> The Microkernel Pattern allows easy addition of new
features.
> Finally, the Microservices Pattern helps build scalable
and flexible applications, like Netflix.

17 | Page
Software architecture and design individual assignment

Choosing the right pattern is key to making the


software adaptable, maintainable, and
successful.

2) What is Design Pattern?


* Design patterns
S normally working on a code level.
S are best practices for Opp's problems.
S is time tested solution for software architecture
problem.
S It provides a blueprint that how to solve a specific
problem or design issue at the level of individual classes
and objects, rather than the overall structure of a
system.
S deals with any destruct you apply to break a large unit
into manageable chunks

. Definition: Reusable solutions for common problems in


software design.
. Focuses on low-level implementation within a system.
. Purpose: Solve recurring issues in object interactions
and behavior.

18 | Page
Software architecture and design individual assignment

Types of Design Patterns


1. Creational Patterns:
o Singleton: Ensures only one instance of a class exists.
Analogy: A single water tank serving multiple taps.
o Factory: Creates objects without specifying their exact
class.
Analogy: A factory machine producing different
products.
2. Structural Patterns:
o Adapter: Converts one interface to another. Analogy:
A power plug adapter that allows a US plug to fit into a
European socket.
o Composite: Represents a tree structure where objects
are treated uniformly.
Analogy: A company hierarchy with employees and
managers.

19 | Page
Software architecture and design individual assignment

3. Behavioral Patterns:
o Observer: Notifies observers when a subject's
state changes.
Analogy: News channels updating subscribers on
breaking news.
Strategy: Defines interchangeable algorithms for
a task.
Analogy: Multiple routes for reaching the same
destination.

Summarized:

• design patterns as common solutions at the


method or component level.
• Architecture patterns are broader in scope and
apply to systems of components.
• Design Patterns differ from Architectural
Patterns in their scope, they are more localized,
they have less impact on the code base, they
impact a specific section of the code base
• An Architectural Pattern is a way to implement
an Architectural Style;

20 | Page
Software architecture and design individual assignment

. A Design Pattern is a way to solve a localized


problem.
. Architectural Patterns means how your house should
be look like and design pattern how your interior
should look like.

Software Architecture Pattern vs Design Pattern


Features Software Design
Architecture Pattern
Pattern
Definition • This is a • This is a low-
high-level level solution
structure of for common
the entire software
system design
21 | Page
Software architecture and design individual assignment
problems
within
components
Scope • Borad, • Narrow,
covers focuses on
entire individual
system components
• Specific
problem or
feature
Purpose • Establish • Provide
entire reusable
system solutions for
layout the recurring
• High-level problems
organization within a
systems'
implementati
on
• Low-level
implementati
on details
Focus • System • Behavioral
stability, and
structural structural
organization aspects
22 | Page
Software architecture and design individual assignment
within
components
Documentati • It involves • It includes
on architectura UML
l diagrams diagrams,
and high- detailed
level design design
documents specifications
Examples • Layered • It includes
Architectur UML
e, diagrams,
Microservic es, detailed
Client- design
Server specifications

Choosing the Right Architecture


❖ Here are some key considerations to help choose the
right architecture pattern:
1. Scalability: How well the system needs to scale with
the increasing load?
2. Performance: Are there any specific performance
requirements such as low latency?

23 | Page
Software architecture and design individual assignment

3. Availability: Does the system need to be fault-


tolerant?
4. Security: What are the security requirements of
the system and what are the potential threats?
5. Budget: What are the budget constraints for the
development and the maintenance of the system?
6. Tools and Technology Stack: What technology
and tools will be required?

24 | Page

You might also like