Skip to content

Architecture & infra design doc (Channels + Mongo + Redis + Workers) #112

Description

@mehalyna

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions