0% found this document useful (0 votes)
3 views25 pages

Module1 Part4

The document outlines various software architecture patterns, including layered, client-server, event-driven, microkernel, microservices, and pipe-filter patterns. Each pattern is described with its structure, usage scenarios, and limitations, providing insights into their applications in software development. The document emphasizes the importance of selecting the appropriate architecture pattern based on specific project requirements and constraints.

Uploaded by

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

Module1 Part4

The document outlines various software architecture patterns, including layered, client-server, event-driven, microkernel, microservices, and pipe-filter patterns. Each pattern is described with its structure, usage scenarios, and limitations, providing insights into their applications in software development. The document emphasizes the importance of selecting the appropriate architecture pattern based on specific project requirements and constraints.

Uploaded by

K Karthik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

VARIOUS ARCHITECTURE PATTERNS

SOFTWARE ARCHITECTURE PATTERN

• An architectural pattern is the outline that allows you to express and define a
structural schema for all kinds of software systems.

• It’s a reusable solution that provides a predefined set of subsystems, roles, and
responsibilities, including the rules and roadmap for defining relationships
among them.

• It helps you address various software engineering concerns such as performance


limitations, high availability, minimizing business risk, etc.

• Famous examples of architectural patterns are microservices, message bus,


service requester/ consumer, MVC pattern, MVVM, microkernel, n-tier, domain-
driven design components, and presentation-abstraction-control.
1. LAYERED PATTERN

• As the name suggests, components(code) in this pattern are


separated into layers of subtasks and they are arranged one
above another.

• Each layer has unique tasks to do and all the layers are
independent of one another. Since each layer is independent, one
can modify the code inside a layer without affecting others.

• It is the most commonly used pattern for designing the majority of


software. This layer is also known as ‘N-tier architecture’.
LAYERED PATTERN

Basically, this pattern has 4 layers.

[Link] layer (The user interface layer where we see and enter data
into an application. Responsible for user interactions with the software
system)
[Link] layer (this layer is responsible for executing business logic as
per the request.)
[Link] layer (this layer acts as a medium for communication
between the ‘presentation layer’ and ‘data layer’.
[Link] layer (responsible for handling data, databases.)
LAYERED PATTERN
Usage:

•Applications that are needed to be built quickly.


•Enterprise applications that require traditional IT departments and processes.
• Reuse and documentation -Appropriate for teams with inexperienced
developers and limited knowledge of architecture patterns.
•Applications that require strict standards of maintainability and testability.

Limitations:

• Many layers-Unorganized source codes and modules with no definite roles


can become a problem for the application.
• Skipping previous layers to create tight coupling can lead to a logical mess
full of complex interdependencies.
• Basic modifications can require a complete redeployment of the
application.
[Link]-Server Pattern
• A client-server architecture pattern is described as a distributed application structure
having two main components – a client and a server.

• This architecture facilitates the communication between the client and the server, which
may or may not be under the same network.

• A client requests specific resources to be fetched from the server, which might be in
the form of data, content, services, files, etc. The server identifies the requests made and
responds to the client appropriately by sending over the requested resources.

• The functionality of this architecture is highly flexible as a single server can serve
multiple clients, or a single client can use multiple servers. The servers can be classified by
the services or resources they provide, irrespective of how they perform.
Client-Server Pattern
Client-Server Pattern
Examples of software developed in this pattern:
•Email.

•WWW.

•File sharing apps.

•Banking, etc…

So this pattern is suitable for developing the kind of software listed in the
examples.
Client-Server Pattern
Usage:

• Applications like emails, online banking services, the World Wide Web, network printing,
file sharing applications, gaming apps, etc.
• Applications that focus on real-time services like telecommunication apps are built with a
distributed application structure.
• Applications that require controlled access and offer multiple services for a large number of
distributed clients.
• An application with centralized resources and services that has to be distributed over
multiple servers.
CLIENT-SERVER PATTERN
Limitations:
• Incompatible server capacity can slow down, causing a performance
bottleneck.
• Servers are usually prone to a single point of failure.
• Changing the pattern is a complex and expensive process.
• Server maintenance can be a demanding and expensive task.
[Link]-DRIVEN PATTERN
• Event-Driven Architecture is an agile approach(Request-Response) in which services
(operations) of the software are triggered by events.

Well, what does an event mean?


• 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.
• Eg: 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.
• Ideal for: Building websites with JavaScript and e-commerce websites in general.
Event-driven Pattern

• The event-driven architectural style consists of two topologies :


mediator and broker.
• A mediator is used when multiple steps are needed to be arranged within an event bus
through a central mediator.
• A broker or connector is used to chain events together without using a central
mediator.
Event-driven Pattern
Event-driven Pattern

• The diagram represents a common event-driven architecture design pattern, in which


events feed actions in applications and repositories.

• The event is generated by some action, is fed through a connector or broker, then is
processed, usually in a stream processing platform, and finally, a result is delivered to an
application or repository.
Event-driven Pattern
Usage:

•For applications where individual data blocks interact with only a few modules.

•Helps with user interfaces.

Limitations:

• Testing individual modules can only be done if they are independent, otherwise, they need
to be tested in a fully functional system.

• When several modules are handling the same events, error handling becomes challenging
to structure.
[Link] 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.
•The plug-in modules handle the extended functionalities (like extra features) and customized
processing.
•The core includes special rules, business logic, or complex conditional processing, plugins are
independent, stand-alone components that consist of custom codes, specialized processing, and
additional features.
In short, the core and plugins of the microkernel architecture provide flexibility, isolation, and
extensibility of custom processing logic and features.

Microkernel pattern is ideal for:


Product-based applications and scheduling applications.
Microkernel Pattern
Microkernel Pattern
•Example:

▪ 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.
[Link] PATTERN
• The collection of small services that are combined to form the actual application is the concept of
microservices pattern.

• 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.

• 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.

• Modules in the application of microservices patterns are loosely coupled. So they are easily
understandable, modifiable and scalable.

• Example Netflix is one of the most popular examples of software built-in microservices
architecture. This pattern is most suitable for websites and web apps having small components.
Microservices Pattern
Microservices Pattern
Usage:

• Businesses and web applications that require rapid development.

• Websites with small components, data centers with well-defined boundaries, and remote
teams globally.

Limitations:

• All applications do not include tasks that can be split into independent units.

• Performance can be affected because of tasks being spread across different microservices.
[Link]-FILTER PATTERN
• A pipe-filter architecture pattern processes a stream of data in a
unidirectional flow where components are referred to as filters, and pipes
are those which connect these filters.

• The chain of processing data takes place where the pipes transmit data to
the filters, and the result of one filter becomes the input for the next filter.

• The function of this architecture is to break down significant


components/processes into independent and multiple components that can be
processed simultaneously.
Pipe-Filter Pattern
Pipe-Filter Pattern
Usage:
• It can be used for applications facilitating a simple, one-way data processing and transformation.

• To perform advanced operations in Operating Systems like UNIX, where the output and input of
programs are connected in a sequence.

Limitations:
• There can be a loss of data in between filters if the infrastructure design is not reliable.
• The slowest filter limits the performance and efficiency of the entire architecture.
• During transmission between filters, the data-transformation overhead costs might increase.
• The continuous transformational character of the architecture makes it less user-friendly for
interactional systems.

You might also like