Falling back to SMS, any suggestion?

I am writing an app for chatting, however, I need to know at server when broadcasting a message, that certain users did not receive the message for some reason (ex: android app was in background) and thus decide to send them a push notification instead.

What is the recommended way to know the status of user at server side? I thought I would wait for certain time an acknowledgment ping for each message that it has received, then if I didn’t received that ping, I will send push notification, is this a good way?

Shouldn’t Phoenix.Presence be able to help you handle this? I haven’t used it so far by myself, but I liked the talks about it :wink:

Thank you, I thought that Presence is only useful at client side!

According to what I’ve learnt from the talks, Presence is used to keep track of connectivity of a multiple clients associated with the same user across multiple servers, where in each case multiple can mean zero to infinite.

Since the client doesn run Phoenix, it seems to be used Serverside :wink:

1 Like

I can confirm that we’ve used Phoenix Presence successfully server side to detect of we should send a push notification. We accomplish this with a per-user channel (although there are other approaches). It works well in production :slight_smile:

2 Likes