> 1. I assume the "endpoint" is the equivalent of a device token for > APNS and registration ID for GCM
By endpoint I meant JID. The Client Backend Service will need some XMPP aware component to receive notification payloads from their users' XMPP servers and convert those into their Proprietary Push Notification service format of choice. > 2. I didn't see a way to make the server advertise its "provider ID" > which is necessary at least for APNS and GCM. Maybe in the discovery > reply stanza? Your XMPP server only advertises that it can relay notifications to the user's Client Backend Service. It's the CBS that has a provider ID, etc. An example: 1) An iOS client app, named Otalk. 2) The Otalk developers runs a private XMPP server (push.otalk.im) solely for receiving push notification payloads from external servers. 3) I run my own XMPP server on lance.im, which supports this XMPP Push extension. So I install Otalk on my phone, and establish a connection to my own server, lance.im. The Otalk client detects that lance.im supports the push extension via disco/caps. The Otalk client then registers the 'push.otalk.im' endpoint (which the Otalk client knows about because it's hardcoded) as a recipient for push notifications for la...@lance.im on lance.im. Included in that registration MAY be some ID value that the Otalk client provides, which is completely opaque and only intended for use by 'push.otalk.im' as the registered endpoint. (Eg, the Otalk client app could request an ID value from its backend server that associates 'la...@lance.im' with a device id/token before starting the registration process at lance.im.) I then go offline or do something which causes my server, lance.im, to trigger a push notification. It then sends the notification payload (whatever we end up defining for that) to the relevant push endpoints that have been registered for la...@lance.im. In this case, push.otalk.im. The notification is then received by push.otalk.im, and the push.otalk.im server then converts that information into an iOS Push Notification, which requires the use of private key material issued to the Otalk developers to sign the iOS push request. My phone then receives the iOS push notification, which displays a message that 'Otalk' has done something, and maybe updates the Otalk app badge. Fin. My server, lance.im, never needs to know anything about iOS or GCM or anything specific to my phone. It has no 'provider ID'; my server never talks to Apple, Google, etc. What it does have is essentially a special PubSub/PEP node that has user approved subscribers and is only published to by the server under certain conditions and possibly only to certain subscribers at a time. It's up to the installed app to communicate with its own backend services to share device IDs and tokens, and it's up to the app's backend service to forward that notification over its preferred proprietary push service to the installed app on some device. — Lance
signature.asc
Description: Message signed with OpenPGP using GPGMail