I'd like to implement two way communication between a cross platform mobile client (Android, PC - written in Java and iOS written in Objective-C) and my Google AppEngine (Java) server. It should:
- Allow each side to initiate the communication (after the client connects).
- Have relatively short latency (polling every X seconds is problematic, and to my understanding, since it's on AppEngine, long polling an http request is not an option).
- Support messages that are at most few KB of text, and usually much smaller.
I have considered using the Channel API with some reverse engineered Java client, but this seems like taking a chance (since it isn't officially supported). Also, I'm not even sure there is a solution for Objective-C, and I prefer not to dive in and implement it myself.
I then considered using XMPP. However, I'm not sure how this is possible without having my users enter a Jabber account, which I cannot (the communication is in the background). Is there a way to create a temporary user for my client?
C2DM doesn't seem like a good option either. It's not cross platform, it seems very focused on "notification" and not communication, and makes no guarantees on the success of message transfer.
Or perhaps there is a completely different approach I haven't thought of? This type of communication is relatively new to me.
Thanks!
EDIT:
Since I'm looking for background communication, a new option came to mind: A single XMPP user, with resources as client identifiers. Meaning, I'll create a single XMPP user for my app once (something like: "AppBackgroundUser@domain.com"), and have the clients connect with their own unique ID as a resource ("AppBackgroundUser@domain.com/UNIQUEID"). Are there any drawbacks or severe security flaws to this method?