Loading...
User's presence is described as Online and Offline
For Each User in connections we expose a notify API, if the connections subscribe to notify (Yes). they are notified each time the user status changes Online -> Offline and Offline -> Online
Defining the system data model early on will clarify how data will flow among different components of the system. Also you could draw an ER diagram using the diagramming tool to enhance your design...