Hi, I’m using Phoenix Channels for developing an instant messaging social networking mobile app. Requirement is to have a WhatsApp like group chat feature. Idea was to use phoenix presence to identify the online users for instant message broadcast and to send push notification to offline users. However, while going through presence docs. it seems we get to know only the online (connected) users and the events of user leaving.
- What’s the ideal design to get list of all offline users for a topic (group in this case)? Should i use a db query to get the delta of users and then fire a push notification? Doing that for every message, on every topic, felt a bit expensive in terms of performance. Am i missing any built in mechanism in phoenix channels/presence for handling this use case?
- Or, for handling a persistent chat for mobile app with offline push, delivery receipts, message history load for when user comes online - should i be using an XMPP alternative like Ejabberd or MongooseIM ?