Reputation: 2642
Please read through this question I have been having and share your thoughts and ways to solve for this.
We are currently building a system consisting of multiple microservices.
For simplicity sake assume the following scenario:
There's
---------| microservice A | microservice B | microservice C |
---------| RDS for A | | RDS for B | | RDS for C|
Now we are struck at a problem where we need
Column Amount
from records of Table TA1
from RDS A
to sort records of Table TC1
from RDS C
If this were a single DB application we would normally proceed with Joining
two tables on the common ID TA1.id = TC1.ta1_id
Since these microservices cannot share a common DB as that goes against pattern of microservices.. what is the best to solve for these use cases?
A new microservice to aggregate data? If so how do we handle memory error if plan on loading every record instead of doing a join i.e two select queries.
Upvotes: 0
Views: 547
Reputation: 25909
"Since these microservices cannot share a common DB as that goes against pattern of microservices." That's a pattern ,it has a context and assumptions
Since your question is really generic - it is hard to say which option is right in your case
Upvotes: 3