Architectural Patterns
1. Client-Server Architecture
In this model, the system is divided into two main components: the client and the server.
-
Client: The client is typically the user-facing part of the system, such as a web browser, mobile app, or desktop application. Clients send requests to the server and display the results to the user.
-
Server: The server processes client requests, manages resources like databases, and sends the required data or services back to the client.
2. Microservices Architecture
Microservices architecture is an approach to designing a system as a collection of loosely coupled, independently deployable services.
Each microservice corresponds to a specific business function and communicates with other services via lightweight protocols, often HTTP/REST or messaging queues.
Services are small, focused on doing one thing well and each service has its own database to ensure loose coupling.
3. Serverless Architecture
Serverless architecture abstracts away the underlying infrastructure, allowing developers to focus solely on writing code.
In a serverless model, the cloud provider automatically manages the infrastructure, scaling, and server maintenance.
Developers deploy functions that are triggered by events, and they are billed only for the compute time consumed.
Ideal for applications that react to events, such as processing files, triggering workflows, or handling real-time data streams.
4. Event-Driven Architecture
Event-Driven Architecture (EDA) is a design pattern in which the system responds to events, or changes in state, that are propagated throughout the system.
In EDA, components are decoupled and communicate through events, which are typically handled asynchronously.
Events can be processed in parallel by multiple consumers, allowing the system to scale efficiently.
5. Peer-to-Peer (P2P) Architecture
P2P architecture is a decentralized model where each node, or "peer," in the network has equal responsibilities and capabilities.
Unlike the client-server model, there is no central server; instead, each peer can act as both a client and a server, sharing resources and data directly with other peers.
P2P networks are known for their resilience and scalability since there is no central point of failure and system can scale easily as new peers join the network.
Creator