Answer the question
In order to leave comments, you need to log in
How to split a list of contacts into microservices?
Please share information. For example, it's easy for me to divide something into two services
* Message service (dialogs)
* Profile search service - there is data Name Age City, etc.
It turns out two independent services and everything is fine. But. If I want to make a list of contacts, then in addition to the ID(from)*ID(to) pair, there is also information about the name, which is controlled by the questionnaire service. And information about the last message sent, its short text and status, read or not. This data is already managed by the messaging service.
Aggregate data from all services on the client? Or denormalize the database, and store both messages and contact names in contacts?
Answer the question
In order to leave comments, you need to log in
There are several options, each has pros / cons, so the choice of the optimal one depends on the specific task. The first 2 options are consistent with those voiced in the question, but I do not exclude the 4th option.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question