How nasrin-code/distributed_media_processing_microservice works
This is a distributed media-processing service: clients upload media, submit asynchronous jobs, and check job status. The API validates requests, records pending status, and dispatches work; a Celery worker processes video jobs and updates Redis. The README also describes S3 presigned uploads, metrics, image operations, and an optional Streamlit UI. The image service is shown as a capability, but no sampled source connects it to job dispatch. Broker and shared-volume links rely on README documentation.
Main entry points: main.py FastAPI API · tasks.py Job worker · redis_service.py Redis service · app.py Streamlit UI
Components 16
User interface
- Streamlit UI
frontend/app.py
API and requests
- FastAPI API
app/main.py - Job models
app/models/job.py
Background processing
- Celery configuration
app/celery_app.py - Job worker
app/tasks.py - Video processing
app/services/video_service.py - Image operations
app/services/image_service.py
State and monitoring
- Redis service
app/services/redis_service.py - Metrics collection
app/metrics.py
External integrations
- RabbitMQ broker
- Redis store
- S3 integration
app/services/s3_service.py - Amazon S3
- Shared upload files
Other components
- Client
- Metrics endpoint consumer
Connections 22
- Client → Streamlit UI: uses
README.md - Streamlit UI → FastAPI API: uploads and submits
frontend/app.py - Streamlit UI → FastAPI API: checks status
frontend/app.py - FastAPI API → Job models: validates requests
app/main.py - FastAPI API → Redis service: stores pending status
app/main.py - FastAPI API → Celery configuration: dispatches task
README.md - FastAPI API → Job worker: submits job
app/main.py - FastAPI API → S3 integration: requests upload URL
app/main.py - FastAPI API → Shared upload files: saves upload
README.md - Job worker → Celery configuration: uses app
app/tasks.py - Celery configuration → RabbitMQ broker: configures broker
app/celery_app.py - Job worker → RabbitMQ broker: receives jobs
README.md - Job worker → Redis service: updates status
app/tasks.py - Job worker → Video processing: runs operation
app/tasks.py - Job worker → Shared upload files: reads upload
README.md - Redis service → Redis store: reads and writes
app/services/redis_service.py - FastAPI API → Metrics collection: updates metrics
app/main.py - Job worker → Metrics collection: records CPU usage
app/tasks.py - Metrics collection → RabbitMQ broker: queries queue
app/metrics.py - FastAPI API → Metrics endpoint consumer: exposes metrics
README.md - FastAPI API → Redis service: reads status and CPU
app/main.py - S3 integration → Amazon S3: generates presigned URL
app/services/s3_service.py