💼 Implementation choices: File System, Persistent Data Store
📌 When to use:
Applications require high throughput without real-time delivery (GBs of data to a filesystem or million rows to a database)
✅ Pros:
Simple implementation
⚠️ Limitations:
Developers have to build retry mechanism on their own
Tight coupling <- If data store changes structure in some way, communication might break
2. Request-Response with Synchronous Blocking
💼 Implementation choices: REST API
📌 When to use: Chain of calls (requests) have to be resolved in a strict order
✅ Pros:
Simple, more intuitive to developers
⚠️ Limitations:
Temporal coupling: dependencies between services based on timing and availability - specifically when components must be simultaneously available and responsive for the system to function
High domain coupling: Senders have to know receivers' capabilities to make a request to appropriate server
Styles of Microservice Communication
1. Communication through Common Data
💼 Implementation choices: File System, Persistent Data Store
📌 When to use:
✅ Pros:
⚠️ Limitations:
2. Request-Response with Synchronous Blocking
💼 Implementation choices: REST API
📌 When to use: Chain of calls (requests) have to be resolved in a strict order
✅ Pros:
⚠️ Limitations:
3. Request-Response with Asynchronous Blocking
💼 Implementation choices: gRPC, Queue-based brokers
📌 When to use: Chain of calls (requests) have to be resolved in a strict order in which has long-running processes
✅ Pros:
⚠️ Limitations:
4. Event-driven Communication
💼 Implementation choices: Topic-based brokers
📌 When to use:
✅ Pros:
⚠️ Limitations: