4 ms·
What's wrong with that?
by teko_ji 7y ago
What's wrong with that?
- Leace 7y agoNot the poster but it may be useful to know that Andrew_nenakhov is a CEO of company that provides a Jabber messanger (Xabber).
- teko_ji 7y agoI'm glad.
- Andrew_nenakhov 7y agoMy occupation is not really relevant here, but yes, such service could be coded in maybe 60 minutes tops to accept a JSON and forward it to XMPP, and it would be way more efficient. Don't like XMPP? Ok, make a Telegram bot and receive notification with it.
- Andrew_nenakhov 7y agoBecause it is the most inefficient approach possible. You either have potentially long delays before receiving a notification (if you poll service once an hour, average delay would be 30 minutes), or you do LOTS of polling, draining the battery/abusing the service. If you have 20 notifications / day and you check service every minute, in a day you'll make 24*60 poll requests, only 1,38% of which would yield some meaningful payload.
- nicolas314 7y agoAnd yet, this is exactly how push notifications are implemented on mobile phones. You have the illusion to push a message from server to device while in fact you also push a message onto a queue that is polled at regular intervals by the mobile. No way around it, mobile devices don't have guaranteed connectivity as servers do.
- Andrew_nenakhov 7y agoNo. That's not how it works. From the Apple Developers Documentation [1], "On initial launch of your app on a user’s device, the system automatically establishes an accredited, encrypted, and persistent IP connection between your app and APNs." This persistent connection is, in fact, an XMPP session (likely, a modified one) [2]. Google's FCM too uses XMPP [3]. [1] https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/APNSOverview.html https://developer.apple.com/library/archive/documentation/Ne... [2] https://www.quora.com/What-technology-does-the-iOS-Apple-Push-Notification-Service-APNS-use-to-maintain-a-persistent-connection-with-each-device-to-receive-such-fast-push-notifications https://www.quora.com/What-technology-does-the-iOS-Apple-Pus... [3] https://firebase.google.com/docs/cloud-messaging/xmpp-server-ref https://firebase.google.com/docs/cloud-messaging/xmpp-server...
- icedchai 7y agoIf you look at the format of APNS messages, they are nothing like XMPP. It seems very unlikely Apple uses it. That link you post does not confirm it.
- Andrew_nenakhov 7y agoFormat of APNS messages is just a payload. The information about APNS being based on XMPP was widely available on developer.apple.com and was often mentioned in developer sessions in 2010..12 when I was actively following it. The current absence of direct XMPP mentions on Apple Deveoper website might mean that they consider their internal technology not important for developers, or it might mean that Apple had changed the protocol for some reason (they could have opted to use some binary protocol, for example), but claiming that push notifications work on iOS devices by polling servers is beyond ridiculous. VoIP pushes arrive in ~1 second. Such response times would require 40000 poll requests/day or more
- icedchai 7y agoI never claimed APNS worked by polling. I was developing iOS apps in the 2010-2012 time frame and never saw a mention of XMPP. I simply don't believe they are using it. They must have their own proprietary solution.
- re_dmitriy 7y agoThere is no need for frequent updates for a lot of data. This application is not for instant messages.