Service-Level Architecture β
NDP Microservices Interaction β
This diagram shows how the Egypt NDP microservices interact with each other and the infrastructure components.
Prescription Service Flow β
Dispense Service Flow β
Service Communication Patterns β
1. Synchronous REST APIs β
Used for:
- Real-time queries
- CRUD operations
- Registry lookups
2. Asynchronous Events (Kafka) β
Used for:
- Audit logging
- Notifications
- Data replication
- Analytics
3. Caching Strategy (Redis) β
Used for:
- Registry data
- Session management
- Rate limiting
- Temporary storage
Service Dependencies Matrix β
| Service | PostgreSQL | MySQL | MongoDB | Redis | Kafka | Consul | Vault |
|---|---|---|---|---|---|---|---|
| Prescription Service | β | β | β | β | β | β | β |
| Dispense Service | β | β | β | β | β | β | β |
| Patient Registry | β | β | β | β | β | β | β |
| HPR Registry | β | β | β | β | β | β | β |
| Pharmacy Registry | β | β | β | β | β | β | β |
| Medicine Directory | β | β | β | β | β | β | β |
| Audit Service | β | β | β | β | β | β | β |
| Notification Service | β | β | β | β | β | β | β |
API Gateway Routing β
Data Flow Architecture β
Service Health & Resilience β
Circuit Breaker Pattern β
Health Check Architecture β
Next Steps β
- Network Architecture - Detailed network topology
- Gateway Stack - Deploy the API gateway
- Application Stack - Deploy NDP services