Jon Cox
Jon Cox

Reputation: 10922

Using XMPP for frequent communication with mobile app

A mobile app I'm working on requires the server to communicate with it frequently over a short period of time, including real-time (or very close) things for the app to show (from other users).

It will be an iOS and Android app.

I was researching C2DM and on this page http://code.google.com/android/c2dm/quotas.html, at the bottom it recommends considering "implementing XMPP or your own protocol to exchange messages".

What I want to communicate between the server and the app does not fall easily into XMPP's usual chat roll, how would you go about actually implementing it?

Would it be a case of choosing appropriate XMPP libraries for the server and mobile app languages, then making a custom server (and client side)? Wouldn't this drain the battery on the phone? Can it be done over a RESTful architecture?

(If it helps, there are currently no decisions made for the server - other than it has to be highly scalable).

Upvotes: 1

Views: 931

Answers (1)

Robin
Robin

Reputation: 24282

If what you want to communicate can be easily represented as XML and is not too large, then it can be easily done via XMPP. XMPP is very extensible. You will have to write the client side (to be expected) and use one of many available servers. Customization on the server usually means writing a component (generic and supported by the spec) or some sort of plugin (this will be server specific), but without more information I couldn't tell you if that would be required or not.

It is used for much more than just chat apps, although that would be the most common usage. Pretty much any text based instant messaging can be handled (as well as others). There are a huge number of extensions to the base protocol to support a wide variety of functionality.

Upvotes: 2

Related Questions