- If you use chat, use websockets.
- If you are implementing single-user messages in real time, use the server that sent the events.
- If you are running single-user messages sent every few hours or so, use APNS.
The proverb goes on the phone in his hand, uses events related to servers / servers. Phone in your pocket, use APNS.
APNS will ease wifi failures, tcp / ip hangs and many other problems. Really helpful. It is likely that a little time may pass for the passage. But then again, there is a chance that websockets will take
Recent versions of iOS allow you to send APNS to a client without a pop-up message to the client so that it can request additional information from the server. This, together with some background implementations, really improves the situation.
If possible, do not implement fully anonymous clients. It is very difficult to determine if the client will reinstall the application. That way you end up sending duplicates to the client. This must be considered.
APNS looks trivial to implement in ruby, but I suggest avoiding desire and am going to use an existing gem / service that supports both Google and Apple. This is much more complicated than it might seem at first glance.
If you decide to stick with web maps, it might make sense to just use websockets in nginx, like https://github.com/wandenberg/nginx-push-stream-module
ASIDE: Using SMS, where speed is critical, is very expensive. $ 1 / month only sends a maximum speed of 1 message per second to a phone number. Thus, sending 100 messages per second = $ 100 / month plus message fee. Please note that 100 messages at a speed of 50 messages per second = $ 50 per month. But if you want to send 1k messages, it will take 20 seconds.
Good luck.
source share