lundi 9 janvier 2023

Which design patterns we need to use in Microservice Architecture when we use API Gateway

I have checked various documents and could see there are couple of design patterns in Microservices.

Aggregator Design Pattern
API Gateway Design Pattern
Chained or Chain of Responsibility Design Pattern
Asynchronous Messaging Design Pattern
Database or Shared Data Design Pattern
Event Sourcing Design Pattern
Circuit Breaker Design Pattern
Decomposition Design Pattern
etc.

I am going to use API Gateway in Microservices. As I am using API Gateway, I am using API Gateway Design Pattern obviously. I am also having Database per Service, so I am using Database per Service Design Pattern as well. I am also using Asynchronous Messaging for inter service communications. So in that case I am using Asynchronous Messaging Design Pattern as well.

So basically, I am combining multiple Design Patterns like API Gateway Design Pattern, Database per Service Design Pattern & Asynchronous Messaging Design Pattern. So is it correct to combine multiple design patterns together when designing Microservices or we should stick to only one Design Pattern?

Note: I will be writing Microservices in Java & Spring Boot.

Aucun commentaire:

Enregistrer un commentaire