Domain definition – RecommendationService
We already know that we will apply the asynchronous messaging design pattern in our application using the RecommendationService
microservice as an example. This is a very simple service to create and is far from the complexity of microservices of recommendations in production in the real world. Therefore, RecommendationService
is a microservice with a didactic purpose for practicing the use of the asynchronous messaging design pattern.
Having made this initial caveat, let's define the business and RecommendationService
domain. The idea is very simple. Whenever a news portal user searches for any specific news, the labels in that news will be associated with the user ID. By relating the IDs on the labels, we can find out what the favorite subjects of a user are, and we can use it to recommend news and customize web pages.
The microservice will also have an endpoint where you can see the labels that a user has as favorites and another endpoint where...