This project is a distributed video transcoder built using distributed systems principles.
The Distributed Video Transcoder enables users to upload videos and receive download links for the videos in multiple formats.
- Users can upload videos and receive download links for the transcoded videos in different formats.
- The system can handle a high volume of concurrent users.
- The system is fault-tolerant to ensure reliability.
- The transcoded videos are returned in consistent quality without corruption.
For an overview of the system design, refer to the architecture diagram:
Follow the steps below to set up and run the project locally:
- Docker installed on your machine.
- Go Migrate CLI installed for managing database migrations.
-
Install Docker
Ensure Docker is installed and running on your machine. -
Run Kafka with Docker Compose
Start the Kafka service:docker-compose up -d kafka
-
Create Kafka Topic
Access the Kafka container and create a topic namedvideo
:docker-compose exec kafka /bin/bash kafka-topics.sh --create --zookeeper zookeeper:2181 --replication-factor 1 --partitions 3 --topic video exit
-
Run PostgreSQL with Docker Compose
Start the PostgreSQL service:docker-compose up -d postgres
-
Apply Database Migrations
Apply the migrations to set up the database schema:migrate -path video-service/db/migration -database "postgres://postgres@localhost:5000/postgres?sslmode=disable" -verbose up
-
Start the Services
Restart all services to ensure everything is up and running:docker-compose down && docker-compose up -d
-
Access the Application
Open your browser and navigate to http://localhost:8080 to use the application.