Push Notification vs. Web Sockets for implementing a real-time chat app?

APNS is not 100% reliable. It is in most cases, but not 100%. It is also not as quick as a dedicated service you would offer. Sometimes, push messages take upwards of one minute to arrive. You need to consider these and take it into consideration in any design you come up with. If you can live with these limitations, you can indeed rely on the APNS to update your client. Moreover, with iOS7, an app could wake up in the background, retrieve data and update its UI so that user is presented with an up-to-date app.

While speaking about performance, to be able to handle a multitude of open connections and service them concurrently is not as simple as it sounds, so depending on your resources, you may not be able to provide a better service uptime than Apple’s APNS, so the limitations above, while true, are not necessarily as bad as they may sound.

I think best would be, since you need to implement push support anyway, to implement APNS only, and see if this satisfies you and your clients. Remember that the sandbox (debug) APNS servers are slower than normal production APNS servers, so test with release versions to see the real performance implications of going APNS-only. If down the road you notice that the provided service is not enough, you can only implement further services.

Leave a Comment