{"action":"created","issue":{"url":"https://api.github.com/repos/royneary/mod_push/issues/4","labels_url":"https://api.github.com/repos/royneary/mod_push/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/royneary/mod_push/issues/4/comments","events_url":"https://api.github.com/repos/royneary/mod_push/issues/4/events","html_url":"https://github.com/royneary/mod_push/issues/4","id":112291926,"number":4,"title":"How does it work?","user":{"login":"bangarharshit","id":2506196,"avatar_url":"https://avatars.githubusercontent.com/u/2506196?v=3","gravatar_id":"","url":"https://api.github.com/users/bangarharshit","html_url":"https://github.com/bangarharshit","followers_url":"https://api.github.com/users/bangarharshit/followers","following_url":"https://api.github.com/users/bangarharshit/following{/other_user}","gists_url":"https://api.github.com/users/bangarharshit/gists{/gist_id}","starred_url":"https://api.github.com/users/bangarharshit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bangarharshit/subscriptions","organizations_url":"https://api.github.com/users/bangarharshit/orgs","repos_url":"https://api.github.com/users/bangarharshit/repos","events_url":"https://api.github.com/users/bangarharshit/events{/privacy}","received_events_url":"https://api.github.com/users/bangarharshit/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-20T05:47:29Z","updated_at":"2015-10-20T18:26:39Z","closed_at":null,"body":"How does xep-0357 works for offline messages for GCM. I believe GCM is itself an XMPP server and on my mobile I checked ping time to be very high (15 minutes on wifi and 28 minutes on mobile network). How is gcm useful for offline messages? The only usecase I can think of is for Android your service which contains the connection is killed frequently and restated after some time disconnecting you."},"comment":{"url":"https://api.github.com/repos/royneary/mod_push/issues/comments/149656601","html_url":"https://github.com/royneary/mod_push/issues/4#issuecomment-149656601","issue_url":"https://api.github.com/repos/royneary/mod_push/issues/4","id":149656601,"user":{"login":"royneary","id":1942810,"avatar_url":"https://avatars.githubusercontent.com/u/1942810?v=3","gravatar_id":"","url":"https://api.github.com/users/royneary","html_url":"https://github.com/royneary","followers_url":"https://api.github.com/users/royneary/followers","following_url":"https://api.github.com/users/royneary/following{/other_user}","gists_url":"https://api.github.com/users/royneary/gists{/gist_id}","starred_url":"https://api.github.com/users/royneary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/royneary/subscriptions","organizations_url":"https://api.github.com/users/royneary/orgs","repos_url":"https://api.github.com/users/royneary/repos","events_url":"https://api.github.com/users/royneary/events{/privacy}","received_events_url":"https://api.github.com/users/royneary/received_events","type":"User","site_admin":false},"created_at":"2015-10-20T18:26:39Z","updated_at":"2015-10-20T18:26:39Z","body":"> How does xep-0357 works for offline messages for GCM\r\n\r\nYou might want to read [a blog article](https://blog.process-one.net/my-gsoc-2015-project-push-for-xmpp/) I wrote recently.\r\n\r\nmod_push does not work for offline clients. It will initiate push notifications for clients which are in stream management's 'waiting for resumption' state (a.k.a. zombie state). The resume timeout is adjusted to a big timespan (at the moment it's 100 days). So mobile clients are expected to close their TCP connection, but their XMPP stream is kept by the server. \r\n\r\n> How is gcm useful for offline messages? The only usecase I can think of is for Android your service which contains the connection is killed frequently and restated after some time disconnecting you.\r\n\r\nPush notifications are meant as a power saving mechanism. A client can close its TCP connection and then only react to push notifications. A typical reaction would be to connect to the XMPP server and pick up new stanzas. So push notifications can be used as a wake-up mechanism but XEP-0357 also allows including message contents in the push notifications.\r\nIn the future Android might stop apps, it's called [app standby](http://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-power). This might make keeping a permanent connection harder or impossible.\r\n\r\n> Also wanted to know which ejabberd version are you guys planning to release. We are thinking of patching ejabberd master (which may not be super simple).\r\n\r\nI merged @processone's master into [my ejabberd brach](https://github.com/royneary/ejabberd) a few weeks ago, so it shouldn't be very hard to patch the current master. My ultimate plan is to merge my branch into their master."}}