androidgoogle-app-enginersssuperfeedr

XMPP support in Google App Engine


I am in the process of developing a lightweight Android application that receives push notifications when a new entry is made to an RSS Feed. The backend resides on the Google App Engine. I originally started using Cron to poll the Feed every 30 minutes, until I learned about Superfeedr.

It sounds easy enough to use. I basically make an HTTP Post request with certain parameters that include the feed URL I want to follow, the callback URL, and a few other parameters.

I have seen examples of how to add XMPP support on an application deployed to Google App Engine, and I have a question:

According to the app engine documentation: The URL path /_ah/xmpp/message/chat is reserved for XMPP messages to be sent to. If I need a 2nd XMPP URL, are there any restrictions on what the url path looks like? Do I even have to use /_ah/xmpp/message/chat at all?

Superfeedr, to the best I can tell, recommends separate callback URL's for different feeds. I'm assuming that's so you won't have to go through the work of manually parsing the message to determine which feed it's for.

Parsing the XMPP message in the request looks straightforward, so I'm not sure if I try to make the call to parseMessage inside of a Servlet other than /_ah/xmpp/message/chat if that will cause an issue.

Thanks


Solution

  • The /_ah/xmpp/message/chat URL is the endpoint your app uses to receive incoming XMPP messages from the App Engine XMPP infrastructure. You would not use it directly as a callback from Superfeedr in your scenario. It's only for your app to use to react to XMPP messages sent to the app's JIDs (app-id@appspot.com or *@app-id.appspot.com).

    It looks like Superfeedr can use HTTP endpoint callbacks for pushing RSS updates. You can use any endpoint of your own design for this purpose. You'd set the callback field of the PubsubHubbub subscription to the HTTP URL of your app that you want to use. You don't need XMPP at all to interact with Superfeedr. (Technically, you could use it with their XMPP Pubsub feature and one of the app's JIDs, with a request handler mapped to /_ah/xmpp/message/chat, but that's a roundabout way of doing it.)

    In case you're also thinking of XMPP for the Android push, you can just use Google Cloud Messaging (GCM) for that part. https://developer.android.com/google/gcm/index.html