西维蜀黍

【Design Pattern】Microservices - Event Sourcing Pattern

Context

A service command typically needs to update the database and send messages/events. For example, a service that participates in a saga needs to atomically update the database and sends messages/events. Similarly, a service that publishes a domain event must atomically update an aggregate and publish an event. The database update and sending of the message must be atomic in order to avoid data inconsistencies and bugs. However, it is not viable to use a distributed transaction that spans the database and the message broker to atomically update the database and publish messages/events.

  ...


【Design Pattern】Microservices - Audit Logging Pattern

Context

You have applied the Microservice architecture pattern.

Problem

How to understand the behavior of users and the application and troubleshoot problems?

  ...


【Design Pattern】Microservices - API Composition Pattern

Problem

How to implement queries in a microservice architecture?

  ...


【Design Pattern】Microservices - Database per Service Pattern

Context

Let’s imagine you are developing an online store application using the Microservice architecture pattern. Most services need to persist data in some kind of database. For example, the Order Service stores information about orders and the Customer Service stores information about customers.

  ...


【Design Pattern】Microservices - Decompose by Business Capability Pattern

Context

You are developing a large, complex application and want to use the microservice architecture. The microservice architecture structures an application as a set of loosely coupled services. The goal of the microservice architecture is to accelerate software development by enabling continuous delivery/deployment.

  ...