4 ms·
Also a push-notification needs something on the client to react to it, be that a running normal or a background-process. Pull needs maybe an additional backgrou
by onli 14y ago
Also a push-notification needs something on the client to react to it, be that a running normal or a background-process. Pull needs maybe an additional background-process and generally wastes more energy, but APNS can't be that much magic.
- mikeash 14y agoI think the power consumption advantages of APNS come from the fact that it's built into the OS and it's multiplexed, meaning that you only ever need one persistent connection/monitoring/etc. no matter what needs to listen. If you did XMPP directly, you'd need a separate background process and connection just for that, in addition to APNS. If you had two different apps doing this, then you'd need two processes and connections, etc.
- LaGrange 14y agoYou need only one process, and, furthermore it being push means it's possible to handle it with way more resources (you don't really have to maintain anything on the client, excluding the relatively rare situations when something important changes and you have to tell about that to the server).