Personal Budgeting Service
Managing personal finances effectively is crucial in today's world. To address this need, I have developed a Personal Budgeting Application that allows users to track their expenses and income.The application leverages a Microservices Architecture (MSA) to ensure scalability, flexibility, and efficiency. This post will walk you through the architecture, technologies, and development pipeline of the application.
Architecture Overview
The application is divided into four distinct microservices, each handling a specific task. This modular design enables seamless scaling and better fault isolation.
- Receiver Service
- Acts as the entry point for user data.
- Utilizes Kafka as a message broker for asynchronous communication.
- Ensures efficient handling of incoming data transactions.
- Storage Service
- Consumes message from
Kafka - Responsible for persisting user data securely.
- Uses MySQL as a database for structured storage.
- Ensures reliability and quick data retrieval.
- Processing Service
- Run Periodically.
- Update and Fetch new data since "last_updated" and store into SQLite
- Analyzing Service
- Cosumes message from Kafka.
- Help users to query specific data using Kafka
Technology Stack
To ensure efficiency, scalability, and ease of maintenance, the application leverages the following technologies:
- Microservices Architecture (MSA) for modular development.
- Kafka as a message broker for decoupled and event-driven communication.
- MySQL for secure and structured data storage.
- Docker for containerization, ensuring consistency across environments.
- Jenkins for CI/CD to automate building, testing, and deployment
- GitLab as a source code management platform
- Microsoft Azure for hosting key infrastructure components. including the Apache Proxy Server, Kafka, GitLab, and Jenkins
Infrastructure and Deployment Setup
Key components that I deployed in Microsoft Azure
- Apache Proxy Server: acts as a gateway for accessing the self-hosted GitLab and Jenkins
- Kafka: handles communication between four microservices
- Self-hosted GitLab and Jenkins: for code management and CI/CD pipeline
Configured Let's Encrypt for SSL certification and enforced HTTPS on the Apache proxy server to enhance security.
Used Azure Active Directory to enable the
Implemented a Webhook to send notifications whenever code changes are made, ensuring real-time updates
CI/CD Pipeline
To maintain a streamlined development and deployment process, I have integrated Jenkins as our Continuous Integration and Continuous Deployment (CI/CD) pipeline. The key steps include:
- Code Commit & Build: Developers push code changes to a version control system GitLab
- Automated Testing: Every commit triggers the pipeline and Jenkins runs unit and integration tests to ensure code quality.
- Containerization: All services are packaged into Docker containers for consistency.
- Deployment: The updated services are deployed to the production environment using automated pipelines
Lesson Learned
Building this Personal Budgeting Application was a rewarding experience. It provided hands-on experience in developing a microservices architecture, implementing asynchronous communication, and working with cloud computing. This project deepened my understanding of modern software development principles.
- Asynchronous Communication: allows services to operate independently
- Self-hosting the GitLab and Jenkins on Azure: provided valuable experience of configuring applications and setting up networking between services.
