Task 1 — Architecture & infra design doc (Channels + Mongo + Redis + Workers)
Title: design: Messaging architecture doc (Django Channels + MongoDB + Redis + worker)
Deliverables
-
Short design document covering:
- Why MongoDB for message store (fast append, BSON, flexible metadata) and Postgres for relational data (users, notifications).
- Channel layer: Redis (requirements and config).
- Websocket routing & authentication approach (JWT or session cookie).
- Message lifecycle: send → persist → publish to channel → create notification via background worker.
- Scaling & retention strategy (sharding, TTL indexes in Mongo, archiving).
- Security (auth checks, sanitize message content, limit attachments).
- Backpressure & rate limiting approach.
-
Diagrams (sequence for send/receive, flow for offline notifications).
Acceptance
- Doc committed to
docs/architecture/messaging.md.
- Team sign-off (one reviewer).
Dependencies
- Existing auth & user model.
- Infrastructure: Redis, MongoDB, Celery (or chosen worker), channels.
Notes
- Provide recommended Redis and Mongo versions and sample
docker-compose service definitions for local dev.
Task 1 — Architecture & infra design doc (Channels + Mongo + Redis + Workers)
Title: design: Messaging architecture doc (Django Channels + MongoDB + Redis + worker)
Deliverables
Short design document covering:
Diagrams (sequence for send/receive, flow for offline notifications).
Acceptance
docs/architecture/messaging.md.Dependencies
Notes
docker-composeservice definitions for local dev.