The fast increment in the number of IoT (Internet of Things) devices is accelerating the research on new solutions to make cloud services scalable. In this context, the novel concept of fog computing as well as the combined fog-to-cloud computing paradigm is becoming essential to decentralize the cloud, while bringing the services closer to the end-system. This article surveys e application layer communication protocols to fulfill the IoT communication requirements, and their potential for implementation in fog-and cloud-based IoT systems. To this end, the article first briefly presents potential protocol candidates, including requestreply and publish-subscribe protocols. After that, the article surveys these protocols based on their main characteristics, as well as the main performance issues, including latency, energy consumption, and network throughput. These findings are thereafter used to place the protocols in each segment of the system (IoT, fog, cloud), and thus opens up the discussion on their choice, interoperability, and wider system integration. The survey is expected to be useful to system architects and protocol designers when choosing the communication protocols in an integrated IoT-to-fog-to-cloud system architecture. 116:2 J. Dizdarević et al. growing by the day [1, 2] . The huge amount of data generated by these devices requires one to find a proper system architecture able to both process and store all the data. While cloud-based architectures are being currently used for that purpose, the new fog computing paradigm is envisioned to scale and optimize the IoT infrastructures [3] . Examples of the cloud-based IoT solutions have been proposed in [4] [5] [6] and a detailed analysis of properties for IoT cloud providers has been conducted in [7] . These studies have shown that cloud computing has the potential to satisfy many IoT requirements, such as monitoring of services, powerful processing of sensor data streams and visualization tasks. On the other hand, fog-based solutions are suited to address real-time processing, fast data response, and latency issues, thus extending the cloud capabilities closer to the edge of the network [8] . Among many factors that will determine the performance in a combined IoT, fog, and cloud computing paradigm, the application layer communication, which in turn depends on the selected communication protocols, is one of the main ones. Despite the popularity and widespread usage of HTTP, the currently used protocols in various domains of IoT, fog, and cloud domains are de-facto fragmented with many different solutions. This is due to the different requirements and areas that IoT needs to cover, combining the functionalities of sensors, actuators, and computing power with security, connectivity, and a myriad of other features. As a result, there is no common agreement on the reference architecture or adopted standards of communication protocols. Thus, one of the fundamental challenges for system engineers is to choose the appropriate protocol for their specific IoT system requirements, while leveraging the advances in fog and cloud computing. For this challenge to be addressed, some general architecture requirements need to be taken into consideration. These requirements include devices that can range from resource constrained devices to high performance cloud systems, data generated to be processed between the cloud and the fog layer, the types of wireless connectivity that can be used, or security and privacy solutions, just to name a few. While there have been several surveys covering different aspects of the IoT architecture [1, 6, [9] [10] [11] [12] [13] , the specific issues of communication protocols in the application layer have not been addressed yet. This article surveys communication protocols in the application layer (also referred to as messaging protocols and machine-to-machine, depending on the context) in IoT architectures in the context of specific challenges in fog and cloud computing integration, including MQTT (Message Queuing Telemetry Transport), AMQP (Advanced Message Queuing Protocol), XMPP (Extensible Messaging and Presence Protocol), DDS (Data Distribution Service), HTTP (Hypertext Transfer Protocol), and CoAP (Constrained Application Protocol). Recognizing the fact that one single messaging protocol will not be enough to cover the entire communication on the combined IoT-F2C architecture built by bringing together IoT, fog, and cloud systems, our goal is to unveil open issues and challenges toward the end goal: their seamless interoperability, coordination, and integration. To this end, the article first presents a comparative analysis of the main characteristics of IoT communication protocols, including request-reply and publish-subscribe protocols. After that, the article surveys each protocol in detail, and discusses their implementation in various segments of the system (IoT, fog, cloud), and thus opens up the discussion on their interoperability and wider system integration. Finally, we also review the main performance issues, including latency, energy consumption, and network throughput. Compared to other related surveys, including [14-22], our focus is on communication protocols in the application layer, with the goal of both exploring their current status, as well as exploring the potential for their integration in the combined IoT, fog, and cloud systems. The rest of this article is organized as follows. Section 2 presents the background of IoT-F2C architectures and protocols based on a publish-subscribe and request-reply interaction model. Section 3 gives a detailed overview of the main features of application layer protocols. Section 4 presents a comparative performance analysis of the protocols surveyed. Section 5 presents
This group includes protocols such as MQTT (Message Queuing Telemetry Transport), AMQP (Advanced Message Queuing Protocol), XMPP (Extensible Messaging and Presence Protocol), DDS (Data Distribution Service), HTTP (Hypertext Transfer Protocol) and CoAP (Constrained Application Protocol) REF .
A Survey of Communication Protocols for Internet of Things and Related Challenges of Fog and Cloud Computing Integration
CSUR
Computer Science