IT技术及科技前沿

中文IT博客,为IT专业技术人员提供最全面的信息传播和服务

首页 新随笔 订阅 管理

This one has come slightly out of the blue. We’ve always known around here that MQTT is ideal for mobile messaging; the small-footprint, low bandwidth nature of the protocol helps to minimise both battery use and network traffic. Just what you want to stay connected.

Lucy Zhang, a software engineer at Facebook, has written about their new Facebook Messenger app:

One of the problems we experienced was long latency when sending a message. The method we were using to send was reliable but slow, and there were limitations on how much we could improve it. With just a few weeks until launch, we ended up building a new mechanism that maintains a persistent connection to our servers. To do this without killing battery life, we used a protocol called MQTT that we had experimented with in Beluga. MQTT is specifically designed for applications like sending telemetry data to and from space probes, so it is designed to use bandwidth and batteries sparingly. By maintaining an MQTT connection and routing messages through our chat pipeline, we were able to often achieve phone-to-phone delivery in the hundreds of milliseconds, rather than multiple seconds.

You can read her full post here.

posted on 2012-01-26 14:50  孟和2012  阅读(342)  评论(0编辑  收藏  举报