How arc-arnob/healthe-master works
Main Components
• API Service Layer: Show the entry point into the system (the API gateway, for example, catalog-service). It handles load balancing, security, and request routing.
• Composite Layer: This layer abstracts multiple backend API calls. It acts as a single point of contact for external requests and contains cross-cutting concerns (such as circuit breakers).
• Core Layer: This consists of the business and data services. In this project, it contains:
– Forum API (community discussion and thread management)
– Appointment Booking API (patient–doctor scheduling)
– Store Locator API (finding nearby pharmacies)
– Diagnosis API (sub-services for heart attack, stroke, and diabetes prediction that interface with Django/ML models)
– Medication API (prescription management)
• Support Services: These include the Authentication/Authorization API (using JWT), Mailing API (for sending notifications/emails), and possibly other auxiliary services.
• Infrastructure Components: Represent the underlying service registry (Eureka), load balancer (Ribbon), circuit breaker (Hystrix), proxy/gateway (Zuul) and even a dedicated JWT-based security infrastructure.
Relationships and Interactions
• Request Flow: External requests first hit the API Gateway which then routes to the composite layer. The composite layer aggregates calls, applies circuit breaking (using Hystrix), and then forwards requests to the appropriate core service.
• Internal Microservices Communication: Each microservice (forum, appointment, diagnosis, medication, store locator) uses its own database (SQL or NoSQL as seen in the file configuration) and communicates via REST APIs. They register with the service registry for dynamic discovery.
• Security: Every request (except unsafeguarded services like the Store Locator API) must carry an encrypted JWT token. Each service independently verifies and authenticates with the Authentication/Authorization API.
Architectural Patterns and Design Principles
• Layered Architecture: Clearly organize the architecture into the API service layer, composite layer, and core/supported microservice layer.
• Microservice Principles: Emphasize that each microservice is independently deployable and has its own persistence mechanism, ensuring loose coupling.
• Fault Tolerance: Indicate the use of circuit breakers to prevent cascading failure.
• Service Discovery: Show how Eureka (or another service registry) enables dynamic service discovery.
Relevant Technologies and Frameworks
• Java, Spring Boot and Spring Cloud components.
• Netflix OSS components such as Hystrix, Ribbon, Zuul, and Eureka.
• Databases: MySQL for relational storage and MongoDB for NoSQL storage in some services.
• JWT for security and authentication.
• Third-party APIs (e.g., TOM TOM for maps).