I'm designing an e-commerce application. Main flow is pretty straightforward: customer add items to basket, checkouts the basket (place an order) and waits for delivery.
There are following requirements:
- basket is kept on backend
- system should handle +5M baskets/orders per day
I know there is no single answer, but I'm looking for some comments/inspirations on how to design the basket & order module(s). I see following options:
basket
andorder
are separate services, andbasket
sends toorder
anID
of abasket
to checkout, thenorders
callsbasket
for a basket details
1A) API call based communication
1B) async message based communication
basket
andorder
are separate services, andbasket
sends toorder
a fullbasket
details
2A) API call based communication
2B) async message based communication
basket
andorder
are the same service, and checked-outbasket
becomes anorder
(it is same entity, just presented to user as basket or order, depending on it's state)