Distributed System Refreshers :
Database per Microservice
The Database per Service pattern, also known as the Database per Microservice pattern, is a design approach in microservices architecture where each microservice has its own dedicated database.
API Gateway pattern
An API Gateway is essentially a single entry point, or a Reverse proxy, that sits between client applications and a collection of backend services.
Microservice Design Pattern - BFF
BFF Pattern: Instead of having a single backend service that serves all frontend applications, you create multiple backend services, each tailored to a specific type of frontend. Each BFF aggregates data from various microservices, formats it, and delivers it in a way that's optimized for the specific frontend.
CQRS
The Command Query Responsibility Segregation (CQRS) pattern is particularly useful in systems where the nature of reading data (queries) is significantly different from writing data (commands). This pattern explicitly separates the read and write operations within an application, allowing each side to be optimized for its specific purpose.
SAGA Pattern
Sagas are mechanisms to maintain data consistency in a microservice architecture without having to use distributed transactions. You define a saga for each system command that needs to update data in multiple services. A saga is a sequence of local transactions. Each local transaction updates data within a single service using the familiar ACID transaction frameworks and libraries mentioned earlier.
Event Sourcing Pattern
The Event Sourcing pattern is a software architecture pattern where changes to an application's state are stored as a sequence of events. Instead of storing the current state of data directly (like in traditional CRUD systems), each state change is recorded as an immutable event, and the current state is reconstructed by replaying these events. This approach offers many advantages, particularly for complex applications that need to keep detailed histories of state changes.
If you found this guide helpful and want to stay updated with more insightful posts on software architecture and engineering, be sure to Follow me and Subscribe for more knowledge-packed content. 🔔💻
Happy learning, and may your systems be ever reliable! 🚀✨