Software Architecture Patterns
Senthil Kumaran
Architect | AI | .NET | GCP | AWS | Azure | Data | DevOps | System Design | Solution-Oriented
Thinking how the enterprise systems are designed? Well, you are with me.
Let's begin..
We have to identify the suitable architecture that will provide us the design and functionality with quality attributes before we start any major software development.
According to Wikipedia,
An?architectural pattern?is a general, reusable solution to a commonly occurring problem in?software architecture?within a given context.
Here we are going to do high-level understanding of the following most important architecture patterns:
Layered Pattern:
It is also known as N-Tier architecture. In here, software is divided into units called layers.
This usually contains 4 different as follows:
Usually, this pattern used in desktop and simple web applications.
Many of my projects have been developed in this pattern.
Client-Server Pattern:
Typical real world use cases of this pattern include online applications such as email, document sharing and banking.
Server provides the service and the client consumes it.?
Usually server has a huge computing power but bound to a limit. There are chances that the server may crash or stop responding when the traffic overwhelming.
This happens to web apps hosted with cloud and on-premises as well.
Pipe-Filter Pattern:
It divides a larger processing task into a sequence of smaller independent processing steps or filters that are connected by channels or pipes.
Stream of complex messages into a stream of unique simple plain text order messages without additional data fields.
This pattern often used in compliers where the consecutive filters perform lexical analysis parsing semantic analysis and code generation.
Model View Controller Pattern:
It separates the application functionality into three kinds of components
?Commonly used in web frameworks such as?ASP.NET, Django.
Event Bus Pattern:
The modern enterprise software is often built as a distributed system that can service asynchronously arriving messages associated with high volume of events.
?It has 4 major components:
Typically used in mobile development, e-commerce apps and notification services.
领英推荐
Microservices Architecture Pattern:
The modern enterprise apps are required to support a variety of browsers and native mobile clients. These days the applications usually handle client requests by executing business logic, accessing a database, exchanging messages with other systems and returning responses.
In this regard monolithic applications can become too large and complex for efficient support and deployment.
The solution is to build applications as microservices, each services is independently deployable and scalable and has its own API boundary.
Different services can be written in different programming languages and manage their own database and developed by different teams.
Many use cases area applicable for a microservices architecture especially those that involve an extensive data pipeline.
Broker Pattern:
It is used to 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 to a broker, clients request a service from the broker and the broker then redirects the client to a suitable service from its registry.
Broker pattern allows for dynamic change, addition, deletion and relocation of objects and it makes distribution transparent to the developer, however among the disadvantages of the broker pattern is that it requires standardization of service descriptions.
This pattern is often used in the message broker software such as Apache Kafka, RabbitMQ.
Peer-to-Peer Pattern:
Peer may act as a client or as a server or as both and it can change its role dynamically with time.
The peer-to-peer pattern supports decentralized computing and is highly robust in the failure of any given node besides it is highly scalable in terms of resources and computing power however there is no guarantee about quality of service as nodes cooperate voluntarily. On top of that, security is difficult to ensure and the system performance often depends on the number of nodes.
This pattern is used in file sharing networks such as Gnutella (system for sharing files) and G2 (Managed File Transfer).
Multimedia protocols such as P2PTV and PDTP as well as in Cryptocurrency based products.
A quick understanding of Gnutella Architecture:
Blackboard Pattern:
This pattern is useful for problems for which no deterministic solution strategies are known.
The Blackboard pattern consists of three 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.
The advantage of using this pattern is the extending the structure of the data space is easy however modifying the structure of the data space is hard as all applications are affected.
This pattern is often used in speech recognition, protein structure identification and robotics.
Alright, enough!
The complete understanding of all these architecture patterns help to decide which to choose based on the technical requirements and nature of business domain.
? Keep learning and keep sharing! ?