0% found this document useful (0 votes)
14 views11 pages

Architectural Styles

Software Architectural Styles

Uploaded by

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

Architectural Styles

Software Architectural Styles

Uploaded by

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

`

Republic of the Philippines


CAVITE STATE UNIVERSITY
Bacoor City Campus
SHIV, Molino VI, City of Bacoor

MODULE 02: ARCHITECTURAL STYLES


INSTRUCTOR: EDAN A. BELGICA

After the completion of the unit, students will be able to:


 Understand various system architectural styles.
 Identify the characteristics and use cases of each style.
 Apply knowledge of architectural styles to design a simple system.

ARCHITECTURAL STYLES

1.1 Introduction

A crucial component of software engineering is software architecture, which establishes the high-
level organization of a system. It includes how parts are designed, how they work together, and
the guiding ideas behind how they are put together. Software system designers can use
architectural styles as templates and guides while creating software.

Architectural Style refers to a set of principles which shapes and guides the design of a system.
It defines a family of systems in terms of a pattern of structural organization. Architectural styles
help to address various aspects such as modularity, scalability, maintainability, and performance
in the design of complex software systems.
`
1.2 Common Architectural Styles

1. Monolithic Architecture:

One of the earliest and most basic architectural forms is monolithic architecture. The system is
intended to function as a single, self-contained unit in a monolithic application. Each component,
including the data access layer, business logic, and user interface, is closely integrated into a
single codebase.

Characteristics:

o Tight Coupling: When parts are closely connected, it is challenging to scale or modify
individual elements without influencing the system as a whole.
o Simplicity: Small to medium-sized applications might benefit from monolithic
architectures since they are easy to build and implement.
o Performance: Monolithic programs can be quite performant because there are no inter-
process communication overheads.

Use Cases:

Monolithic designs work well in smaller applications where performance and ease of use are
more important than scalability and flexibility. Some e-commerce websites, blogging platforms,
and content management systems (CMS) are a few examples.

2. Layered Architecture:

Layered architecture, sometimes called n-tier architecture, divides the software system into
several levels, each in charge of a certain task. Better system organization and maintainability
are made possible by this division.
`

Characteristics:

o Separation of Concerns: Distinct concerns, like data access, business logic, and
display, are handled by different levels.
o Scalability: The ability to scale individual layers allows for improved resource and
performance usage.
o Reusability: Reusing components from one layer in other applications or even in other
sections of the system is frequently possible.

Use Cases:

Web applications, enterprise software, and numerous client-server systems are just a few
applications that use layered structures. They offer an excellent mix of maintainability, scalability,
and modifiability.

3. Architecture of Client-Server:

The system is divided into two primary parts by client-server architecture: the client, which is
responsible for the user interface, and the server, which is in charge of data management and
business logic. A network is used to facilitate communication between the client and server.
`

Characteristics:

o Scalability: This design works well for large-scale applications since servers may be
scaled independently to accommodate growing loads.
o Centralized Data Management: Since data is kept on the server, security and
management can be done centrally.
o Thin Clients: Since most work occurs on the server, clients can be quite light.

Use Cases:

Web applications, email services, and online gaming platforms are just a few of the networked
applications that rely on client-server architectures.

4. Microservices Foundation:

A more modern architectural style called microservices architecture encourages the creation of
autonomous, little services that speak to one another via APIs. Every microservice concentrates
on a certain business function.
`

Characteristics:

o Decomposition: The system is broken down into smaller, more manageable services to
improve flexibility and adaptability.
o Independent Deployment: Continuous delivery is made possible by microservices' ability
to be deployed and upgraded separately.
o Scalability: Individual services can be scaled to maximize resource utilization.

Use Cases:

Large and complicated apps like social media networks, cloud-native apps, and e-commerce
platforms are frequently built using microservices. They work effectively when fault tolerance,
scalability, and quick development are crucial.

5. Event-Driven Architecture:

The foundation of event-driven architecture is the asynchronous event-driven communication


between components. An event sets off particular responses or actions inside the system.

Key Concepts of Event-Driven Architecture

1. Event Producers: Components or services that generate events. Producers detect


changes or actions and create events to represent them. For example, a user clicking a
button on a webpage is an event produced by the user interface.
2. Event Consumers: Components or services that listen for and respond to events.
Consumers can take various actions based on the event they receive. For example, an
email notification service that sends out emails when a new user registers.
3. Event Channels/Brokers: Middleware that transports events from producers to
consumers. Event brokers, such as message queues or streaming platforms (e.g.,
Apache Kafka, RabbitMQ), decouple producers and consumers, ensuring that events are
reliably delivered.
4. Event Processors: Intermediate components that process events before they reach their
final consumers. These processors can filter, aggregate, transform, or enrich events.
5. Event Stores: Persistent storage for events. This allows for event replay, auditing, and
historical analysis. Event stores can use databases optimized for sequential writes and
reads.

How Event-Driven Architecture Works

1. Event Generation: An event producer detects an occurrence (e.g., user input, system
status change) and generates an event. This event contains information about the
`

occurrence, typically in the form of a message or an event object.


2. Event Publishing: The event producer publishes the event to an event channel or broker.
The broker ensures that the event is delivered to all subscribed consumers.
3. Event Consumption: Event consumers that are interested in the event type subscribe to
the event channel. When an event is published, the broker forwards it to all relevant
consumers.
4. Event Processing: Consumers or event processors handle the event, performing actions
such as updating databases, triggering workflows, or sending notifications.

Characteristics:

o Asynchronous Communication: Independently published, subscribed to, and


processed events allow for component-to-component communication.
o Loose coupling: Because of their loose coupling, event-driven systems have more
flexibility regarding component interactions.
o Scalability: Event-driven systems scale effectively and can withstand heavy loads.

Use Cases:

Financial systems, Internet of Things platforms, and online multiplayer games are a few
examples of applications where event-driven architectures are appropriate since they require
real-time processing, flexibility, and scalability.

Example:

6. Service-Oriented Architecture:

A type of architecture known as service-oriented architecture, or SOA, emphasizes providing


`

services as the fundamental units of larger systems. Services may be coordinated to build large
systems since they are meant to be autonomous, reusable, and flexible.

Characteristics:

o Reusability: To minimize effort duplication, services are made to be used again in many
situations.
o Interoperability: SOA strongly emphasizes using open standards to ensure that services
from various suppliers can cooperate.
o Flexibility: Adaptability is made possible by orchestrating services to develop various
applications.

Use Cases:

Enterprise-level applications that necessitate integrating several systems and services frequently
employ SOA. It also frequently occurs in systems when various teams or organizations have
developed separate application components.

7. Peer-to-Peer Architecture:

Peer-to-peer (P2P) architecture enables communication and resource sharing between


networked devices or nodes without depending on a centralized server. Every network node can
serve as both a client and a server.
`

Characteristics:

o Decentralization: The lack of a single point of failure in P2P systems results from their
decentralization.
o Resource Sharing: Nodes can share resources such as files, processing power, and
network bandwidth.
o Autonomy: Every node inside the network possesses a certain level of autonomy,
enabling it to make decisions on its own.

Use Cases:

Peer-to-peer (P2P) architectures are widely employed in distributed systems, video conferencing
software, and file-sharing programs. In these applications, nodes cooperate and exchange
resources without a central authority.

8. Cloud-Based Architecture:

Software systems are developed and delivered using cloud-based architecture, which uses cloud
computing services. Outsourcing infrastructure to cloud service providers makes scalability,
adaptability, and cost-effectiveness possible.
`

Characteristics:

o Scalability: Cloud services are easily expandable or contracted to accommodate


fluctuating needs.
o Cost-effectiveness: Cloud-based architecture lowers initial hardware purchase
requirements and ongoing maintenance expenses.
o Worldwide Accessibility: Cloud architecture enables applications to be accessed from
anywhere in the world.

Use Cases:

Enterprise systems, mobile apps, and online applications are among the use cases for cloud-
based architectures. They are helpful when programs must manage changing workloads or when
regional distribution is crucial.

1.3 Architectural Style Evolution

Over time, software architecture has changed due to technological developments, shifting
business needs, and a better comprehension of the trade-offs involved in various architectural
styles. Here is a quick summary of how architectural styles have changed over time:

o 1980s: Monolithic Origins: Because single-codebase programs were so straightforward,


monolithic architectures dominated the early days of software development.
o 1990s: Client-Server Paradigm: Client-server designs made distributed computing
possible and popularized the idea of dividing the data layer from the display layer.
o 2000s: Web-Based Architectures: Web-based architectures, where the client is often a
web browser, have become widely used due to the growth of the internet. During this
time, service-oriented architectures also started to appear.
o 2010s: Microservices and Cloud: Cloud-based architectures and microservices saw a
`
rise in popularity in the 2010s. Scalability and modifiability issues were addressed by
microservices, and cloud computing enabled affordable, scalable infrastructure.
o 2020s: Advanced and Event-Driven Architectures Event-driven architectures have
become more popular in the early 2020s, especially in real-time applications and Internet
of Things systems. Sophisticated serverless and cloud-native architectures have kept
changing the game.

This progress reflects the continuous search for the best architectural style, considering aspects
like cost-effectiveness, scalability, and maintainability for various applications.

1.4 Emerging Architectural Styles

 Quantum Computing in Architecture:

Conventional software architecture may be affected by quantum computing. New


architectural paradigms could be needed to fully utilize the potential of quantum
algorithms, which include qubits and quantum gates. Watching how software architects
respond to these new possibilities as quantum computing develops will be intriguing.

 AI and Machine Learning-Driven Architectures:

An increasing number of software systems are incorporating AI and machine learning.


This trend might lead to the development of architectural designs specifically intended for
AI-driven applications, particularly those that call for predictive analytics and real-time
decision-making.

 Blockchain-Based Architectures:

The financial, supply chain, and healthcare sectors are among those that are being
revolutionized by blockchain technology. The challenges of distributed ledger systems,
such as scalability, security, and interoperability, will persist in shaping the architectures
of blockchain-based applications.

1.5 References
"Software Architecture in Practice" by Len Bass, Paul Clements, and Rick Kazman.
https://www.javatpoint.com/architectural-styles-in-software-engineering
`

You might also like