Gaming social network , Verify wins.
I am interested in the best design for storing messages between different users something like WhatsApp you can have group chats and whatnot. I have experience with no SQL databases but what is the best way to store the messages as I can see it become extremely large.
Would it help to cache some of the messages to help reduce API calls to the DB?
What would the schema look like?
For a no SQL DB I imagined having the usernames of people in a chat separated by colons as a key e.g username1:username2. This would mean usernames can't have colons. That key could then have all the messages in the chat and from who it was sent from and with time stamps.
So essentially like with any DB I am trying to make it efficient and scalable any ideas?