摘要
以ipad、iphone以及android手机为代表的移动设备和智能终端近年来取得了巨大的发展,其用户数迎来了爆发式的增长.为了适应实际应用中对信息获取及时性,耗电量,以及网络环境等方面的需求,需要用推送的方式取代传统拉取的方式来进行消息的传递,MQTT(Message Queuing Telemetry Transport,消息队列遥测传输)就是专为这种情况所设计的一种消息传递协议.本文介绍了MQTT协议的基本内容和特点,以Mosquitto、Redis等开源项目为基础设计并实现了一个基于MQTT协议的消息推送服务器,能够对用户订阅的消息进行推送,同时还实现了用户身份验证、ACL权限检查、自动订阅话题、热点话题统计、服务器状态监控等功能.
Mobile devices and smart terminal represented by ipad, iphone and the android phones have made a significant development in recent years. The number of their users is growing explosively. In order to meet the requirments of timeliness of accesses of information, power consumption, as well as the network environment in practical application, we should replace the traditional pull way with the push way to deliver messages. MQTT(Message Queuing Telemetry Transport) is a messaging protocol just designed for the situation. This paper describes the basic content and features of the MQTT protocol.Meanwhile it designs and realizes a message pushing server based on the MQTT protocol in foundation of several open source projects such as Mosquitto and Redis.The server can push messages to the users who have subscribed them before.In the meantime, some more functions such as user identity authentication, ACL permission checking, topic automatic subscribing, hot topic stastics and server status monitoring are added.
出处
《计算机系统应用》
2014年第3期77-82,共6页
Computer Systems & Applications