How rahulkumar035/workhub-microconnect works
Main Components
• API Gateway: Acts as the entry point for client requests. It handles JWT authentication and forwards requests to appropriate downstream services.
• Eureka Server: Serves as a service registry for service discovery, allowing microservices to register and communicate seamlessly.
• Microservices – Employee, Project, Team: Each service encapsulates its own domains (e.g., EmployeeController, ProjectController, TeamController), business logic, and data entities. The Employee service also has Kafka-related configuration hinting at asynchronous event processing.
• Infrastructure Services:
– Redis Cache: Used for caching, reducing the strike against the database for read-heavy operations.
– MySQL Database: Likely used as the primary persistence store across services.
– Apache Kafka: Supports event streaming between services, enabling asynchronicity for high throughput.
– Docker: Containerizes services to facilitate deployment.
– Distributed Tracing & Monitoring: Zipkin for distributed tracing and Prometheus for monitoring system health.
Relationships and Interactions
• Clients (web or mobile) interact with the API Gateway.
• The API Gateway, after validating JWT security, routes the requests to the appropriate microservice based on service discovery provided by Eureka.
• Microservices communicate with the MySQL database (and possibly their own dedicated schemas) and leverage Redis for caching.
• Event streaming via Apache Kafka connects services for asynchronous processing (for instance, events published by Employee service).
• Docker runs and manages the deployment of these containerized services.
Architectural Patterns and Technologies
• Microservices Architecture: Each service is modular and independently deployable.
• API Gateway Pattern: Centralized entry point that abstracts the underlying services.
• Service Discovery: Utilized via the Eureka Server.
• Event-Driven Communication: Implemented through Apache Kafka.
• Caching Layer: Redis is prominently used to reduce database load.
• Security: JWT tokens are used at the API gateway to enforce role-based access controls.
• Containerization: Docker is used for packaging and deployment.
• Monitoring & Tracing: Zipkin and Prometheus ensure observability.