{"action":"opened","issue":{"url":"https://api.github.com/repos/marvelm/gcm-scala/issues/1","labels_url":"https://api.github.com/repos/marvelm/gcm-scala/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/marvelm/gcm-scala/issues/1/comments","events_url":"https://api.github.com/repos/marvelm/gcm-scala/issues/1/events","html_url":"https://github.com/marvelm/gcm-scala/issues/1","id":104823474,"number":1,"title":"Use XMPP","user":{"login":"marvelm","id":10149609,"avatar_url":"https://avatars.githubusercontent.com/u/10149609?v=3","gravatar_id":"","url":"https://api.github.com/users/marvelm","html_url":"https://github.com/marvelm","followers_url":"https://api.github.com/users/marvelm/followers","following_url":"https://api.github.com/users/marvelm/following{/other_user}","gists_url":"https://api.github.com/users/marvelm/gists{/gist_id}","starred_url":"https://api.github.com/users/marvelm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marvelm/subscriptions","organizations_url":"https://api.github.com/users/marvelm/orgs","repos_url":"https://api.github.com/users/marvelm/repos","events_url":"https://api.github.com/users/marvelm/events{/privacy}","received_events_url":"https://api.github.com/users/marvelm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-04T03:24:30Z","updated_at":"2015-09-04T03:24:30Z","closed_at":null,"body":"GCM supports upstream messages (client to server) through XMPP. Messages going in both directions are more efficient (improved battery, fewer server resources) with XMPP because of the use of a single persistent connection.\r\n\r\nThere are a few ways to support XMPP.\r\n\r\n - Use the low level `spray.io` package.\r\nThis is the most preferable option because `spray` is already pulled in as a dependency. However, it seems that this package will eventually be part of Akka's IO offering. Akka IO does not currently support SSL/TLS. It will likely be added in the future, but the best solution to this issue that I could find is about 9 months old and no longer valid.\r\n\r\n - Use Netty\r\nNetty has an [example of a secure chat server](https://github.com/netty/netty/blob/master/example/src/main/java/io/netty/example/securechat/SecureChatServerHandler.java). Adding SSL is as simple as adding the `SslHandler` class to the pipeline. It can work around GCM's lack of support for StartTLS. Netty also has a way of decoding XML by using [XmlFrameDecoder](http://netty.io/5.0/api/io/netty/handler/codec/xml/XmlFrameDecoder.html). However in the documentation, it is explicitly stated that the decoder is unsuitable for XMPP."}}