- one user story:
- user click buy button in product detail page,
- show the price of the order: including deduction,shipping fee,user can adjust deduction and pay method
- user submit the order: deduction, decrease stock in shelf and warehouse
- user pay the order: generating brokerage
- web server: Vert.X, SpringBoot
- msg queue: Kafka or RabbitMQ
- microservices
- order
- shelf: price related
- stock:
- user: brokerage/coupon deduction,brokerage generation
- convert http request to a command/query message, send to message queue.
- subsribe response message from message queue,convert to http response and send back
POST /order general data from header such as token,
- ServiceFramework: convert message to service method invocation
- ServiceFramework: other aspect support: security:current user & permission (Spring security?),log,transaction?
- Infrustructure:
//TODO a architect diagram Fundamental -> Service -> Domain
- Authentication & Authroization,fire UserLoginEvent
- fire OrderCreatedEvent
- onOrderCreatedEvent: fill shelf price to order,and fire OrderPricedEvent
- onOrderCreatedEvent: fill balance and brokerage that can be deducted to ther order,and fire OrderBalanceDeductedEvent