We are building a chat app which have a lot in common with WhatsApp, Viber and Line...
One problem which we want to tackle is how to inform specific users on an action that happened in the server. More specifically, if user X change his display name(or picture), users W,Y,Z need to know about the change that occurred.
Users W,Y,Z need to know about the change because X's new display name should be displayed in the chat group, and in the chat group creation (when adding users from the phone's contacts).
It seems that the only solution for that problem is maintaining a data structure of some sort, that connects a given userId to a list of other userIds. This data structure will update when a user registers in the app, and all his contacts will be sent to the server.
Is there a recommend/proven way for saving such data (graph? big table? a document maybe?)
Can we avoid keeping all this data to begin with?
Help on the subject/architecture will be much appreciated.