Reputation: 4276
I have a project that requires communication between Android Clients and a Server.
The communication flow is:
For the direction from clients to the server, there is no problem. But in the reverse direction, from the server to clients, I have some issues. I'm using Google cloud messaging, but I realized there is some delay or loss of commands. I also considered XMPP technique. If I use XMPP, the server and clients will become users of XMPP server (like chat users). It's quite good except the case of losing internet connection.
Anyone, who has experience in XMPP server or/and GCM, kindly give me some recommendations.
Upvotes: 0
Views: 1935
Reputation: 6925
XMPP / Jabber is used for real time communication . If you want to develop a chat app like 'whatsapp' then you should go with XMPP.
GCM is a cloud which stores your messages prior sending even if your app is not running cloud saves your messages and send them as soon as your device got connected to internet.
Your requirement is real time chat , so you must go with XMPP.
Upvotes: 3
Reputation: 4276
I have already tried to use XMPP instead of GCM. Because clients often move very fast so they use 3G or 4G to keep the internet connection. I tested with following scenario:
I tested with 3G and 4G connections, in each test the server counted from 1 to 600
And here is the result:
3G:
4G:
Actually, if clients use 3G connection the delay is not acceptable. Do you have any ideas to solve this problem?
Upvotes: 1
Reputation:
I agree with Brontok, except that:
" GCM is a cloud which stores your messages prior sending even if your app is not running cloud saves your messages and send them as soon as you run your app. "
GCM stores your messages to send them when you have network connection (Android play services is reachable) even if your app is not running You receive the message, and if through notification you can "revive" your app even if it is "dead"
Upvotes: 1