Anyone ?
Apr 17, 2021
5
Level 1
Eloquent relationships between services in microservice architecture
Hello, I am moving an application from monolithic to microservices approach in Lumen, in the monolithic app I have orders table and products table with a one to many relationship between them. Now in a microservices approach it's reasonable to have different service for each. My issue is that I used to have a page responsible for displaying user orders with products using 'with' keyword for eager loading, and also allows the user to filter result by the name of the product. I am asking what is the best way to accomplish this in a microservices approach.
Level 46
Don't overthink it, just call the products microserive from the orders microservice.
But don't forget to cache the products.
1 like
Please or to participate in this conversation.