Skip to content

microservice architectures and distributed systems using Python, Kubernetes, RabbitMQ, MongoDB, mySQL.

Notifications You must be signed in to change notification settings

rishirishhh/MP3-Converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

MP3 Converter Microservice

Overview

The MP3 Converter Microservice is a distributed system designed to convert audio files to the MP3 format. It utilizes microservice architecture principles to achieve scalability, maintainability, and fault tolerance. This microservice is built using Python and leverages Kubernetes for container orchestration, RabbitMQ for asynchronous message queuing, MongoDB for NoSQL data storage, and MySQL for relational data storage.

Features

  • Converts audio files to the MP3 format
  • Scalable and fault-tolerant architecture
  • Asynchronous processing using RabbitMQ
  • Data storage using MongoDB and MySQL
  • RESTful API for interaction with the microservice

Architecture

The MP3 Converter Microservice follows a microservice architecture, which consists of the following components:

  • Converter Service: Converts audio files to the MP3 format.
  • Queue Service: Manages message queuing using RabbitMQ for asynchronous processing.
  • Database Service: Stores data in both MongoDB (NoSQL) and MySQL (relational) databases.
  • API Gateway: Provides a RESTful API for interacting with the microservice.

Screenshot from 2024-03-24 03-08-08

Technologies Used

  • Python: Programming language used for implementing the microservice.
  • Kubernetes: Container orchestration platform for managing and scaling containerized applications.
  • RabbitMQ: Message broker for asynchronous communication between microservices.
  • MongoDB: NoSQL database for storing unstructured data.
  • MySQL: Relational database for storing structured data.

Getting Started

You'll need to do the following pre-requisites before you can use Docker Stacks to perform Kubernetes deployments using YAML files.

Pre-requisites:

  • Install kubectl (https://kubernetes.io/docs/tasks/tools/install-kubectl/)
  • Enable Kubernetes (From Docker Desktop) Turn on Experimental Features (From Docker Desktop) You can quickly tackle the last two pre-requisites by configuring the Docker preferences pane—which can be found from the menu in the Docker Desktop system tray.
  • Make sure Kubernetes enable Ingress.

How to run

Before run in Kubernetes, You should be change something to make sure while running is correct.

  • email, email password to use stmp.
  • connection mysql
  • connection mongodb
kubectl apply -f auth/manifests
kubectl apply -f rabbitmq/manifests
kubectl apply -f converter/manifests
kubectl apply -f notification/manifests
kubbectl apply -f gateway/manifests

Please configuration into /etc/hosts file like this

image

  • Get token by email and password.
curl -X POST http://mp3converter.com/login -u email:password
  • Get token using for APIs later.

  • Install youtube-dl to download video in youtube if you like.

youtube-dl https://youtu.be/eZJhYgPE3Eg test.mkv
  • Upload video API
curl -X POST -F 'file=@./test.mkv' -H 'Authorization: Bearer your_token_here' http://mp3converter.com/upload
  • Please install k9s to monitoring kubernetes.
k9s

image

  • Check you email and try api get mp3 file.
curl --output something.mp3 -X GET 'http://mp3converter.com/download?fid=6370a832268bc743b21c729f' \
--header 'Authorization: Bearer your_token_here'

Happy coding :))

About

microservice architectures and distributed systems using Python, Kubernetes, RabbitMQ, MongoDB, mySQL.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published