I am writing an app which simply has 3 microservices.
- Basket which holds basket and items
class Basket {
Long id;
List<Items> items;
}
class Item {
Long id;
String name;
Long pricingId;
}
- Pricing which calculates and holds price for item
class Pricing {
Long id;
BigDecimal value;
}
- Calculation which calculates and holds sum for basket
class Calculation{
Long id;
BigDecimal sum;
}
For communication i use synchronous requests via REST.
What is the best way to design api between microservices.
ie. how should i fetch just Calculation with only basket id
I use vanila JS on the front side.
Aucun commentaire:
Enregistrer un commentaire