Architectural Patterns

An architectural pattern is a general, reusable solution to a commonly occurring problem in software architecture within a given context.
Architectural patterns are similar to software design pattern but have a broader scope.


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 commonly found 4 layers of a general information system are as follows (it is also the order of layers):

It can be described as:



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.



Consists of two parties; master and slaves.
The master component distributes the work among identical slave components, and computes a final result from the results which the slaves return.



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.



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.



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.



Primarily deals with events and has 4 major components; event source, event listener, channel and event bus.
Sources publish messages to particular channels on an event bus.
Listeners subscribe to particular channels.
Listeners are notified of messages that are published to a channel to which they have subscribed before.



Also known as MVC pattern, divides an interactive application in to 3 parts as:

This is done to separate internal representations of information from the ways information is presented to, and accepted from, the user.
It decouples components and allows efficient code reuse.



Useful for problems for which no deterministic solution strategies are known.
The blackboard pattern consists of 3 main components:

All the components have access to the blackboard.
Components may produce new data objects that are added to the blackboard.
Components look for particular kinds of data on the blackboard, and may find these by pattern matching with the existing knowledge source.



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.


Up Next

In the next step, we will dive into popular design patterns ware reusable solutions to common software design problemslike Singleton, Observer, Factory, and more. By incorporating these patterns into your designs, you can enhance code reusability, maintainability, and flexibility.