https://github.com/sagarmaheshwary/microservices-upload-service
https://github.com/sagarmaheshwary/microservices-upload-service
docker golang grpc grpc-golang microservices prometheus rabbitmq s3
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sagarmaheshwary/microservices-upload-service
- Owner: SagarMaheshwary
- License: mit
- Created: 2024-06-02T11:31:25.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2025-02-15T14:53:00.000Z (3 months ago)
- Last Synced: 2025-02-15T15:34:28.209Z (3 months ago)
- Topics: docker, golang, grpc, grpc-golang, microservices, prometheus, rabbitmq, s3
- Language: Go
- Homepage:
- Size: 39.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# MICROSERVICES - UPLOAD SERVICE
Upload Service for the [Microservices](https://github.com/SagarMaheshwary/microservices) project.
### OVERVIEW
- Golang
- ZeroLog
- gRPC – Serves as the main server for service communication
- RabbitMQ - Enables asynchronous communication with the [encode service](https://github.com/SagarMaheshwary/microservices-encode-service)
- Amazon S3 - Handles generating signed urls from s3 for video uploads that are later processed by encode service
- Prometheus Client – Exports default and custom metrics for Prometheus server monitoring### SETUP
Follow the instructions in the [README](https://github.com/SagarMaheshwary/microservices?tab=readme-ov-file#setup) of the main microservices repository to run this service along with others using Docker Compose.
### APIs (gRPC)
Proto files are located in the **internal/proto** directory.
| SERVICE | RPC | BODY | METADATA | DESCRIPTION |
| ------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ----------------------------------------------------------------- |
| UploadService | CreatePresignedUrl | - | - | Generates a presigned url that can be used to upload videos to s3 |
| UploadService | UploadedWebhook | {"video_id": "string - s3 upload id from presigned-url process", "thumbnail_id": "string - s3 upload id from presigned-url process", "title": "string - video title", "description": "string - video description"} | - | Send video data to encode service via rabbitmq for video encoding |
| Health | Check | - | - | Service health check |### APIs (REST)
| API | METHOD | BODY | Headers | Description |
| -------- | ------ | ---- | ------- | --------------------------- |
| /metrics | GET | - | - | Prometheus metrics endpoint |### RABBITMQ MESSAGES
#### Sent Messages (Published to the Queue)
| MESSAGE NAME | SENT TO | DESCRIPTION |
| ------------------- | --------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| EncodeUploadedVideo | [Encode Service](https://github.com/SagarMaheshwary/microservices-encode-service) | Notifies the Encode service that a new video is ready for processing |