Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/raj3k/rgb-to-grayscale-microservices


https://github.com/raj3k/rgb-to-grayscale-microservices

Last synced: 28 days ago
JSON representation

Awesome Lists containing this project

README

        

# Convert RGB Image to Grayscale Image (Microservices)

## Project Description
Simple application responsbile for converting RGB images to grayscale. Main goal or objective for this project was to build somehow real world project
and learn something about Microservices architecture. The system design is heavily inspired by FreeCodeCamp tutorial:
https://www.youtube.com/watch?v=hmkF77F9TLw&list=PLHzzSkMFgDo8rg9m4n64OTzszpsmziGDd&index=1&ab_channel=freeCodeCamp.org.
I've added very simple client service (used React for that) and changed notification service - instead of sending notification email to user,
I've decided to use Server Send Events to inform user that image is converted and ready to download. Below is a system design diagram:

![diagram](./system-diagram.png)

## Technologies used


  1. TypeScript - used for every service except Converter. Mainly because I'm learning it and simply enjoy working with TS

  2. Python - used for Converter Service because of PIL (Python Image Library)

  3. RabbitMQ - message queue, for this simple project RabbitMQ is more suitable than Kafka (https://www.simplilearn.com/kafka-vs-rabbitmq-article#what_is_kafka_used_for)

  4. Docker/docker-compose

  5. Mongo (GridFS) - I'm storing only small images (<8MB) so in this case Mongo's GridFS is slightly faster than AWS S3 (https://simonjcarr.medium.com/mongodb-gridfs-vs-s3-storage-f5ba1ebcc490)

  6. MySQL - for keeping user data

  7. Server Send Event - I didn't want to use SMTP so notification service is consuming messages from queue and sends event to client service

  8. Nginx - reverse proxy

## How to install/run project


  1. Clone repo

  2. Run docker compose command in project directory: docker-compose -f docker-compose.dev.yaml up -d (TODO: notification service starts before RabbitMQ and throws error, for now Notification Service needs to be restarted manually)

## TODO
- [ ] use Kubernetes for orchestration
- [ ] deploy to AWS?
- [ ] add video displaying usage of the application