Questions:
- When should microservices communicate with each other?
- What are the two main protocols with which microservices can communicate with each other?
- How can Swift be helpful in facilitating communication between microservices?
- Describe three scenarios in which your shop application has to implement communication between services.
Answers:
- Whenever they absolutely have to, but no more than that.
- WebSockets and REST.
- It is fast and provides good asynchronous tools.
- Three scenarios:
- Order confirmation (price check)
- Shipping (third-party vendor API)
- Payment (third-party payment API)