Backdrop is a concurrent, asynchronous task orchestration service built with Go. It allows users to upload files, trigger background processing, track progress, and optionally cancel jobs in-flight — all with real-time feedback and robust status tracking.
- Asynchronous file processing (non-blocking)
- Unique upload URLs per request
- Task cancellation support (server-side invalidation)
- Polling endpoint for task status
- Clean context-aware Goroutine management
- JWT-based user authentication
- Task persistence via PostgreSQL
| Component | Purpose |
|---|---|
| Go | Core backend logic (goroutines, context, channel-based workers) |
| PostgreSQL | Task metadata, user data, and login tokens |
| Redis | Fast pub/sub and task state caching |
| Polling | Task status updates to frontend |
| Docker | Containerization for local or cloud deployment |
backdrop/
├── api
│ └── user
│ └── task
├── cmd
│ └── server
├── go.mod
├── go.sum
├── internal
│ ├── middleware
│ ├── router
│ └── util
├── migration.sql
├── pkg
│ ├── constants
│ ├── crypto
│ ├── database
│ ├── formatter
│ ├── text
│ └── validator
├── README.md
└── TODO.md
- Go 1.20+
- PostgreSQL running locally
git clone https://github.com/rranand/backdrop.git
cd backdropgo mod tidyPORT=8080
DB_URL=postgres://user:pass@localhost:5432/backdrop?sslmode=disable
JWT_SECRET=your-secret-key| Method | Endpoint | Description |
|---|---|---|
| POST | /auth/login |
Login and receive token |
| POST | /task/request |
Request a file upload session |
| POST | /task/upload/:id |
Upload file to task |
| POST | /task/cancel/:id |
Cancel ongoing task |
| GET | /task/status/:id |
Poll task status |
| GET | /task/result/:id |
Fetch result (if completed) |
- WebSocket-based live task updates
- Retry policy for failed tasks
- Admin dashboard (task queues, worker health)
- Multi-user role support
- Metrics + alerting (Prometheus/Grafana)
- Goroutines, context cancelation, worker pools
- Safe concurrent access to shared resources
- Token-based authentication
- Structuring scalable Go services
- Database schema design for async systems
MIT © 2025 Rohit Anand