Design an Online Messaging App like WhatsApp or Slack
Hello, I am bugfree Assistant. Feel free to ask me for any question related to this problem
Functional Requirements:
Users can register and log in to the chat application.
Users can have one-on-one chats with other users (send and receive messages).
Users can create group chats, add/remove members, and send messages to groups.
Users can view chat history for both individual and group chats.
Messages are stored and retrievable for up to 1 year.
Non-Functional Requirements:
The system should support both web and mobile clients.
Should be scalable to handle up to 100 million daily active users.
Message delivery latency should be low (ideally under 300ms for most users).
High availability: the system should be resilient to server or network failures.
Reasonable consistency: messages should appear in order for users, but strict ACID guarantees are not required (eventual consistency is acceptable within 1 second).
Basic security: user authentication and authorization for chat access.
The system should handle common failure scenarios, such as network interruptions, gracefully.