本文介绍了不GCM(谷歌云通讯)使用的是什么技术?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否通过轮询服务器定期工作?
它的工作原理采用长期持有的HTTP请求,就像彗星?
或者,那里有他们使用了一些新的技术?

Does it work by polling the servers periodically ?Does it work using long-held http request , like comet ?Or theres some new technology they are using ?

推荐答案

下面是一个很好的概述:的

Here is a good overview: http://developer.android.com/google/gcm/gcm.html

某处它解释说,GCM是pferred到应用程序投票,因为Android操作系统是通过长期持有OS连接到服务器GCM做轮询$ P $。因此,即使他们称之为推技术,它实际上正在轮询/由设备拉动。然后,操作系统告诉应用程序有一个消息和应用程序进行检索。谷歌只是做所有的应用程序的工作,通过一个通道,该操作系统已经使用检查更新,因此设备不会不断地轮询,如果没有使用GCM所有的应用程序检查回到自己的服务器上。

Somewhere it explains that GCM is preferred to the app polling because the Android OS is doing the polling through a long-held OS connection to the GCM server. So even though they call it "push" technology it is really being polled/pulled by the device. The OS then tells the app there is a message and the app retrieves it. Google is just doing the work for all apps through one channel that the OS already uses to check for updates so the device won't be constantly polling as all apps check back to their servers if GCM wasn't used.

有标识,帮助OS知道哪些应用需要哪些信息,开发者需要建立和维护一个服务器,帮助推的消息装置(S)。还有可以播放针对单个设备类型的消息或消息。谷歌列出了几个不同类型的通信机制 - HTTP和XMPP

There are IDs that help the OS know which app needs which message and the developer needs to set up and maintain a server that helps "push" the messages to device(s). There can be broadcast type messages or messages targeting individual devices. Google outlines a couple of different types of communication mechanisms - HTTP and XMPP.

没有真正的新技术 - 谷歌只是提供一个平台/接口/架构开发

No real new technology - Google is just providing a platform/interface/architecture for developers.

这只是信息接触表面 - 有文档中更多的细节。

This info just touches the surface - there is much more detail in the documentation.

这篇关于不GCM(谷歌云通讯)使用的是什么技术?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-14 04:26