Towards Efficient Mobile M2M Communications: Survey and Open Challenges <s> Evaluation and Comparison <s> Wireless sensor networks (WSNs) pose novel challenges compared with traditional networks. To answer such challenges a new communication paradigm, data-centric communication, is emerging. One form of data-centric communication is the publish/subscribe messaging system. Compared with other data-centric variants, publish/subscribe systems are common and wide-spread in distributed computing. Thus, extending publish/subscribe systems intoWSNs will simplify the integration of sensor applications with other distributed applications. This paper describes MQTT-S [1], an extension of the open publish/subscribe protocol message queuing telemetry transport (MQTT) [2] to WSNs. MQTT-S is designed in such a way that it can be run on low-end and battery-operated sensor/actuator devices and operate over bandwidth-constraint WSNs such as ZigBee-based networks. Various protocol design points are discussed and compared. MQTT-S has been implemented and is currently being tested on the IBM wireless sensor networking testbed [3]. Implementation aspects, open challenges and future work are also presented. <s> BIB001 </s> Towards Efficient Mobile M2M Communications: Survey and Open Challenges <s> Evaluation and Comparison <s> The use of Internet Protocol (IP) technology in Wireless Sensor Network (WSN) is a key prerequisite for the realization of the Internet of Things (IoT) vision. The IPv6 over Low power Wireless Personal Area Networks (6LoWPAN) standard enables the use of IPv6 in networks of constrained devices. 6LowPAN enables the use of Service Oriented Architectures (SOAs) in WSN. The Internet Engineering Task Force (IETF) has defined the Constrained Application Protocol (CoAP), a web transfer protocol which provides several Hypertext Transfer Protocol (HTTP) functionalities, re-designed for constrained embedded devices. CoAP allows WSN applications to be built on top of Representational State Transfer (REST) architectures. This considerably eases the IoT application development and facilitates the integration of constrained devices with the Web. This work describes the prototype design and development of a Web platform which integrates a REST/CoAP WSN with a REST/HTTP Web application and allows a user to visualize WSN measurements in the Web browser. Since the WSN Web integration relies on a non-transparent gateway/server, we also show how to provide transparent cross-protocol resource access by means of an HTTP-CoAP proxy. The paper describes the major building blocks, functionalities and the implementation approach. <s> BIB002 </s> Towards Efficient Mobile M2M Communications: Survey and Open Challenges <s> Evaluation and Comparison <s> The Constrained Application Protocol (CoAP) is a transfer protocol for constrained nodes and networks, such as those that will form the Internet of Things. Much like its older and heavier cousin HTTP, CoAP uses the REST architectural style. Based on UDP and unencumbered by historical baggage, however, CoAP aims to achieve its modest goals with considerably less complexity. <s> BIB003 </s> Towards Efficient Mobile M2M Communications: Survey and Open Challenges <s> Evaluation and Comparison <s> Due to the growing market and research interests on communication protocols for applications that require little or no human intervention, called Machine-to-Machine (M2M) applications, the European Telecommunications Standardization Institute (ETSI) founded in 2009 a Technical Committee on the topic, which has released its first complete set of technical recommendations in October 2011 as ETSI M2M Release 1. The standard is agnostic with respect to both the application domains in which it can be used, ranging from, e.g., smart grid to personal health systems, and the underlying data transport and access technologies. We demonstrate the feasibility of an ETSI-compliant complete end-to-end system, which uses the Constrained Application Protocol (CoAP) protocol under definition at the Internet Engineering Task Force (IETF), showing its potential to meet the expectations of M2M applications of practical interest. <s> BIB004 </s> Towards Efficient Mobile M2M Communications: Survey and Open Challenges <s> Evaluation and Comparison <s> M2M devices can be deployed at various, often not easy to access locations like rural areas, high on the buildings or on moving vehicles. Mobile networks provide connectivity to such devices over the existing infrastructure. This paper presents an implementation and evaluation of the SMS for M2M communication by utilizing CoAP message semantics. The CoAP is a high-layer protocol that strives to become a standardized solution for M2M communication, and as such is interesting for related activities. The evaluation of regular, concatenated and multicast SMS transport shows that increased SMS traffic can lead to longer delivery time. This may not be a concern for M2M devices that are usually sensors with long sleeping cycles; but for other M2M scenarios that requires higher throughput, higher data rates can be achieved by agreeing over specific SLA with Service Provider. <s> BIB005 </s> Towards Efficient Mobile M2M Communications: Survey and Open Challenges <s> Evaluation and Comparison <s> Lightweight Internet protocols are increasingly being used in ubiquitous environment in order to optimize the resource usage of a constrained device like a smart mobile gateway. This paper presents a study on the various such protocols to optimize the usage of energy, and network resources, computation cost of a constrained gateway device. Comprehensive analysis and feature wise categorization of existing dominant protocols, namely MQTT (message queue telemetry transport), CoAP (constrained application protocol) are provided here to achieve improved understanding of the existing issues and gaps in this domain. The present work further identifies the best suited application areas for each protocol based on the results corresponding to typical resource requirements and performance attributes. Finally our vision on the research scope is presented here mainly for optimization of energy usage. <s> BIB006 </s> Towards Efficient Mobile M2M Communications: Survey and Open Challenges <s> Evaluation and Comparison <s> An emerging trend in many applications is to use resource-constrained wireless devices for machine-to-machine (M2M) communications. The observed proliferation of wireless embedded systems is expected to have a significant impact on future M2M applications if the services provided can be automatically discovered and accessed at runtime. In order to realize the decoupling of M2M applications and services, energy efficient service discovery mechanisms must be designed so as to minimize human intervention during configuration and management phases. However, many traditional service discovery protocols cannot be applied to wireless constrained devices because they introduce too much overhead, fail in a duty-cycled environment or require significant memory resources. To address this, either new protocols are being proposed or existing ones are adapted to meet the requirements of constrained networks. In this article, we provide a comprehensive overview of service discovery protocols that have been recently proposed for constrained M2M communications by the Internet Engineering Task Force (IETF). Advantages, disadvantages, performance and challenges of the existing solutions for different M2M scenarios are also analyzed. <s> BIB007
The functionality of CoAP has been experimentally validated. The main functions of CoAP, working over UDP, observe and discovery, and its interworking with HTTP have been verified by Bormann et al. BIB003 , and the feasibility of an ETSI-compliant complete end-to-end system using CoAP is demonstrated in BIB004 . The transport of CoAP over Short Message Service (SMS)  has also been already implemented and evaluated in BIB005 . A prototype web platform, which integrates a CoAP Wireless Sensor Network (WSN) with an HTTP web application and allows a user to visualize WSN measurements in the web browser is described in BIB002 , demonstrating transparent cross-protocol resource access by means of an HTTP-CoAP proxy. There is also an open source implementation of CoAP written in C often used in the literature BIB006  , Libcoap  . There are two open source MQTT implementations commonly used in experimental validations, Mosquitto  and Paho  . The original developers of MQTT-S implemented an MQTT-S client and gateway and validated them experimentally, having several devices forward packets received from a wireless network to a gateway BIB001 . Apart from small limitations referred in the paper, the gateway was considered to be fully functional. However, further testing with larger number of devices is necessary to evaluate the protocol performance. Table 2 provides a comparison of the main features of CoAP and MQTT. Although CoAP's header is twice as large as MQTT's header, both can be considered very small when compared to application protocols not specific to constrained devices, such as HTTP. The transport layer protocol is a decisive feature in the performance of each protocol. An experimental comparison between CoAP running over UDP and MQTT running over TCP, using libcoap and mosquitto implementations, respectively, is provided in BIB006 . As expected, due to inherent transport layer overheads, they concluded that MQTT consumes higher bandwidth than CoAP for transferring the same payload under same network conditions. From these results, we expect MQTT-S to provide a similar performance to CoAP since it also uses UDP, but this comparison has not been performed so far. CoAP over UDP has also been compared with HTTP over TCP and UDP. The results showed that UDP based protocols perform better for constrained networks (both CoAP and HTTP) than TCP based protocols, due to using lower number of messages when retrieving resources  . However, it is preferred to use CoAP over UDP rather than HTTP over UDP, since the first provides reliability mechanisms. For a fair comparison of application protocols, they should use the same transport protocol, same communication model (in this case, publish-subscribe), and similar parameter values whenever possible. Such performance evaluations have not been made available so far in M2M contexts. A further difference between CoAP and MQTT is their application reliability: CoAP provides two levels of application reliability, correspondent to Level 0 and Level 1 in MQTT/MQTT-S, which have yet another one, Level 2. The reliability mechanisms of both protocols employ a fixed retransmission time-out. This parameter has a direct impact on protocol performance, namely packet delivery ratio and duplicated publications when using Level 0 or Level 1 of both protocols. The increase of retransmission time-out leads to higher packet delivery ratio, and the effect is more visible as the number of publisher nodes increase. Still, overall and for similar configurations, CoAP achieved better packet delivery ratio than MQTT-S in Omnet++ simulations, mainly due to differences in the publication discipline  . CoAP's non-persistent publication discipline gives priority to sending new publications while MQTT-S attempts to retransmit old ones. CoAP abd MQTT allow messages to be sent and received asynchronously, but only CoAP supports synchronous messaging. Finally, only CoAP provides a request-response protocol compliant with REST concepts. Both CoAP and MQTT-S support the use of UDP, intermediary nodes, gateways, to perform requests and responses/relay messages on behalf of other nodes, do caching, aggregation, etc. So, further studies, deployments and field trials need to be conducted to assess their performance, especially in constrained devices and networks, and when a large number of devices is present. MQTT does not provide service discovery. The performance of CoAP service discovery is discussed in BIB007 . In summary, CoAP discovery protocols show better performance in terms of overhead than DNS-based discovery protocols, since it was designed aiming at resource efficiency for constrained devices and networks. Furthermore, based on measurements and functionalities, the authors claim that CoAP's resource discovery allows a more efficient and richer set of mechanisms to perform lookups than DNS-based protocols.