posted 5 years ago
I have a functionality where there is a call to external API , there is call to database table and there is computation using these two.
Microservice 1: Calls the external API (single responsibility).
Microservice 2: Calls the database table (single responsibility).
Microservice 3: Has to perform computation based on the above 2 so it will have to 1) call microservice 1 and 2) microservice 2 to get the results and then 3) use this to do computation. In such a case it becomes multi responsibility instead of single responsibility as it is doing 3 things.
How to keep it single responsibility in such case?