https://github.com/sagarmaheshwary/microservices-video-catalog-service
https://github.com/sagarmaheshwary/microservices-video-catalog-service
cloudfront golang gorm grpc microservices postgresql prometheus rabbitmq s3
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sagarmaheshwary/microservices-video-catalog-service
- Owner: SagarMaheshwary
- License: mit
- Created: 2024-06-02T11:56:31.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-13T16:34:21.000Z (8 months ago)
- Last Synced: 2025-02-13T17:34:57.665Z (8 months ago)
- Topics: cloudfront, golang, gorm, grpc, microservices, postgresql, prometheus, rabbitmq, s3
- Language: Go
- Homepage:
- Size: 55.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# MICROSERVICES - VIDEO CATALOG SERVICE
Video Catalog Service for the [Microservices](https://github.com/SagarMaheshwary/microservices) project.
### OVERVIEW
- Golang
- ZeroLog
- gRPC – Acts as both the main server and client for the User service
- PostgreSQL – Stores video metadata
- GORM – ORM (Object-Relational Mapper) for PostgreSQL
- RabbitMQ – Enables asynchronous communication with the [encode service](https://github.com/SagarMaheshwary/microservices-encode-service) for storing video metadata after encoding
- Prometheus Client – Exports default and custom metrics for Prometheus server monitoring
- AWS S3 & CloudFront – Retrieves video thumbnails from S3 and generates CloudFront URLs for video streaming### 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 |
| -------------------------------------------------------------- | -------- | ------------- | -------- | ------------------------------------------------------------------------------------------------ |
| VideoCatalogService | FindAll | - | - | List videos |
| VideoCatalogService | FindById | {"id": "int"} | - | Get specified video details as well as DASH manifest url from cloudfront for streaming the video |
| [Health](https://google.golang.org/grpc/health/grpc_health_v1) | Check | - | - | Service health check |### APIs (REST)
| API | METHOD | BODY | Headers | Description |
| -------- | ------ | ---- | ------- | --------------------------- |
| /metrics | GET | - | - | Prometheus metrics endpoint |### RABBITMQ MESSAGES
#### Received Messages (Consumed from the Queue)
| MESSAGE NAME | RECEIVED FROM | DESCRIPTION |
| ---------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------- |
| VideoEncodingCompleted | [Encode Service](https://github.com/SagarMaheshwary/microservices-encode-service) | Handles storing video metadata after encoding is complete |