How kasvith/simple-microservice-example works
1. API Gateway (using NodeJS) – this acts as the central routing layer for incoming HTTP requests.
2. Frontend Application – a static/dynamic web client (HTML, jQuery, Bulma) built with webpack that communicates with the API Gateway.
3. Quote Service (using Python) – a microservice responsible for providing quote-related functionality.
• API Gateway: Represented by the “ApiGateway” directory which contains index.js, Dockerfile, and package.json.
• Frontend Application: Represented by the “FrontendApplication” folder, including its Dockerfile, webpack setup, and built assets.
• Quote Service: Represented by the “QuoteService” folder; a Python microservice handling quotes (main.py, quotes.txt).
Their interactions
• The Frontend Application makes calls (using REST API requests) to the API Gateway.
• The API Gateway forwards specific routes or requests to the Quote Service.
• All these services are coordinated via Docker-Compose as indicated by docker-compose.yml, facilitating communication between containers.
Architectural patterns and design principles
• Microservices: Each component runs as an individual service.
• Containerization: Each of the services is containerized (each having its own Dockerfile) and orchestrated using Docker Compose.
• Separation of Concerns: The project clearly divides responsibilities between API handling (API Gateway), presentation (Frontend), and business logic/service (Quote Service).
Incorporate the following technologies and tools
• NodeJS for the API Gateway.
• Python for the Quote Service (note the requirements file and main.py).
• webpack, HTML, jQuery, Bulma for the Frontend.
• Docker and docker-compose for deployment and orchestration.
Final detailing
• That the system follows a modular microservices approach with each service independently deployable as Docker containers.
• Specific ports mentioned in the README (e.g., API gateway on port 3000, Frontend exposed on port 8080).