谷歌云消息或XMPP消息、谷歌云、XMPP

2023-09-08 10:17:04 作者:吃葡萄不吐西瓜皮

我有需要的Andr​​oid客户端和服务器之间的通信的一个项目。

I have a project that requires communication between Android Clients and a Server.

通信流程为:

在客户定期发送其位置到服务器(每10秒) 服务器是一个桌面应用程序(C#或Java)。通常情况下,服务器做自己的工作,但有时它需要发送一个命令到一些具体的客户端(实时要求)

有关从客户机到服务器的方向,就没有问题。但在相反的方向,从服务器到客户端,我有一些问题。我使用谷歌云消息,但我意识到有一些延迟或命令的损失。我也算是XMPP技术。如果我使用XMPP,服务器和客户端将成为用户的XMPP服务器(如聊天的用户)。这是除了失去互联网连接的情况下,相当不错。

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.

任何人,谁拥有XMPP服务器和/或GCM的经验,请给我一些建议。

Anyone, who has experience in XMPP server or/and GCM, kindly give me some recommendations.

推荐答案

XMPP / 的Jabber 用于实时通讯。如果你要开发像WhatsApp的聊天应用程序,那么你应该去使用XMPP。

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 是一个云存储发送之前即使您的应用程序没有运行云节省了您的邮件和他们尽快送为设备得到连接到互联网邮件。

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.

您的要求是实时聊天,所以你必须使用XMPP走了。

Your requirement is real time chat , so you must go with XMPP.