{"id":24452787,"url":"https://github.com/mrzslr/simple-file-processing-pipeline","last_synced_at":"2026-04-15T13:33:43.438Z","repository":{"id":273421463,"uuid":"919672987","full_name":"mrzslr/simple-file-processing-pipeline","owner":"mrzslr","description":"A distributed system for processing image files using microservices and message queues using RabbitMQ.","archived":false,"fork":false,"pushed_at":"2025-01-20T19:56:33.000Z","size":168,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-29T01:42:07.975Z","etag":null,"topics":["docker","docker-compose","file-processing","message-queue","microservice","python","python3","rabbitmq"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrzslr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-20T19:46:21.000Z","updated_at":"2025-02-01T13:37:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"9476df79-1ac0-49ec-be5d-b5521a69b7b4","html_url":"https://github.com/mrzslr/simple-file-processing-pipeline","commit_stats":null,"previous_names":["mrzslr/simple-file-processing-pipeline"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mrzslr/simple-file-processing-pipeline","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrzslr%2Fsimple-file-processing-pipeline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrzslr%2Fsimple-file-processing-pipeline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrzslr%2Fsimple-file-processing-pipeline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrzslr%2Fsimple-file-processing-pipeline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrzslr","download_url":"https://codeload.github.com/mrzslr/simple-file-processing-pipeline/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrzslr%2Fsimple-file-processing-pipeline/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31842940,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T13:28:40.153Z","status":"ssl_error","status_checked_at":"2026-04-15T13:28:29.396Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","file-processing","message-queue","microservice","python","python3","rabbitmq"],"created_at":"2025-01-21T01:17:02.496Z","updated_at":"2026-04-15T13:33:43.433Z","avatar_url":"https://github.com/mrzslr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# File Processing Pipeline\n\nA distributed system for processing image files using microservices and message queues.\n\n# Architecture overview\n\n![Architecture](screenshots/simple-file-processing-pipeline-architecture.png \"simple-file-processing-pipeline-architecture\")\n## Technologies Used\n\n### Languages and Frameworks\n- **Python 3.9**\n- **Flask**: Web framework for upload service\n- **Pillow (PIL)**: Image processing library\n\n### Message Queue\n- **RabbitMQ 3**: Message broker for service communication\n- **Pika**: Python RabbitMQ client\n\n### Containerization\n- **Docker**: Container platform\n- **Docker Compose**: Multi-container orchestration\n\n### Image Processing Features\n- Image resizing (max 800x800)\n- Format support: PNG, JPG, JPEG, GIF\n- Aspect ratio preservation\n\n### Service Communication\n- REST API (Upload Service)\n- Asynchronous messaging (Inter-service)\n- Dead Letter Queue for error handling\n\n## Dependencies\n\nService-specific dependencies are listed in their respective requirements.txt files:\n\n## Configuration\n\nKey configuration parameters (in shared/config.py):\n- Max file size: 10MB\n- Supported formats: PNG, JPG, JPEG, GIF\n- Image max dimensions: 800x800 pixels\n- RabbitMQ connection details\n- Queue names and configurations\n\n## Architecture Overview\n\nThe system consists of four microservices:\n- **Upload Service**: Receives files via HTTP and initiates processing\n- **Validation Service**: Validates file format, size, and type\n- **Processing Service**: Processes images (resizing)\n- **Notification Service**: Handles completion notifications\n\n## Prerequisites\n\n- Docker and Docker Compose\n- cURL (for testing)\n- At least 4GB RAM\n- 10GB free disk space\n\n## Setup and Installation\n\n1. Clone the repository:\n```bash\ngit clone \u003crepository-url\u003e\ncd simple-file-processing-pipeline\n```\n\n2. Create necessary directories:\n```bash\nmkdir -p uploads\n```\n\n3. Build and start services:\n```bash\ndocker-compose build\ndocker-compose up -d\n```\n\n4. Verify services are running:\n```bash\ndocker-compose ps\n```\n\n## Manual Testing\n\n1. Test Upload Service:\n```bash\n# Upload an image\ncurl -X POST -F \"file=@/path/to/your/image.jpg\" http://localhost:5001/upload\n\n# Expected response:\n# {\"message\": \"File uploaded successfully\", \"filepath\": \"/app/uploads/your-image.jpg\"}\n```\n\n2. Check Processing Results:\n```bash\n# List files in uploads directory\nls -l uploads/\n\n# You should see:\n# - Original file: image.jpg\n# - Processed file: image_processed.jpg\n```\n\n3. Check Service Logs:\n```bash\n# Upload Service logs\ndocker-compose logs upload_service\n\n# Validation Service logs\ndocker-compose logs validation_service\n\n# Processing Service logs\ndocker-compose logs processing_service\n\n# Notification Service logs\ndocker-compose logs notification_service\n```\n\n## File Processing Flow\n\n1. **Upload**\n   - Client uploads file via HTTP POST\n   - File is saved to shared volume\n   - Message sent to validation queue\n\n2. **Validation**\n   - Checks file existence\n   - Validates file size (max 10MB)\n   - Validates file extension (png, jpg, jpeg, gif)\n   - Forwards valid files to processing queue\n\n3. **Processing**\n   - Resizes image to max 800x800px\n   - Maintains aspect ratio\n   - Saves processed file with \"_processed\" suffix\n   - Forwards to notification queue\n\n4. **Notification**\n   - Receives processing completion message\n   - Logs completion status\n\n## Error Handling\n\n- Failed validations go to dead letter queue\n- Processing errors go to dead letter queue\n- Services implement retry logic for RabbitMQ connections\n\n## Service Ports\n\n- Upload Service: 5001\n- RabbitMQ Management: 15672\n- RabbitMQ: 5672\n\n## RabbitMQ Management\n\nAccess RabbitMQ management interface:\n```\nURL: http://localhost:15672\nUsername: guest\nPassword: guest\n```\n\n## Troubleshooting\n\n1. Services not starting:\n```bash\n# Check service logs\ndocker-compose logs\n\n# Restart services\ndocker-compose restart\n```\n\n2. Upload fails:\n```bash\n# Check upload service logs\ndocker-compose logs upload_service\n\n# Verify upload directory permissions\nls -l uploads/\n```\n\n3. Processing fails:\n```bash\n# Check processing service logs\ndocker-compose logs processing_service\n\n# Check available disk space\ndf -h\n```\n\n## Cleanup\n\nStop and remove containers:\n```bash\ndocker-compose down\n\n# Remove all processed files\nrm -rf uploads/*\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch\n3. Commit your changes\n4. Push to the branch\n5. Create a new Pull Request","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrzslr%2Fsimple-file-processing-pipeline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrzslr%2Fsimple-file-processing-pipeline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrzslr%2Fsimple-file-processing-pipeline/lists"}