I am creating a chat iOS application using Socket.IO and I had a plan laid out and I was wondering if this is the correct way to do it.
1) The user sends a message from the client side to the sever side, the server side then decides which room/subscription to send to.
2) If a user inside the room did not receive the message it will be stored in the database until he is able to receive it, then it is removed from the database.
Is the correct way to go about doing a group chat type messaging system
Instead, you can have another event such as "isReceived", and if all users included in the group chat has sent that message than you can delete it from database.
I think this will be a better idea, as two-way communication is better than just to assume that user has received it.