# Moving towards Smart Cities: A Selection of Middleware for Fog-to-Cloud Services +
## 2 Related Work
### Discussion  
After reviewing the selected papers, we found that the recent literature has focused on using edge technologies as a new concept that provides localized computing resources for reducing the latency, power consumption of IoT devices, and time of data processing at the edge network. Furthermore, among the selected works, we found that the usability of MCDA algorithms is still in an early stage at edge computing, such as using fuzzy for making decision of whether to execute tasks locally or offload them to fog servers [33], or for monitoring and controlling the network quality-of-service changes within heterogeneous networks at edge computing [48]. Another work proposed a framework based on AHP (Analytic Hierarchy Process) and TOPSIS algorithms for selecting an adaptive mobile cloud service from clouds or cloudlets [49]. Similarly, in [50], the authors used the distances of the fuzzy positive-ideal solution and fuzzy negative-ideal solution to rank the alternatives and select a candidate among clouds, cloudlets or mobile devices to save energy consumption and increase the availability of services for the end-users. However, in the era of edge computing, many systematic challenges should be considered such as what is the definition of the best practice for choosing sophisticate services? Is it to select services from fog-to-cloud platforms, cloud servers, or only fog nodes?  
Indeed, edge computing comes to resolve the deficiencies of cloud services by realizing ubiquitous computing in real-time. Similarly, cloud services enhance the functionalities of edge platforms by collaborating with them. In other words, the concept of fog computing enables us to run the IoT tasks in a secluded environment from the rest of the network, which could cause a failure of fogging to satisfy the requirement of large processing capacities of IoT services that can only be served by the cloud infrastructure. On the other hand, IoT sensors sensitive to latency must resort to fog computing in terms of the communication network. Thus, the combination of cloud and fog services will reduce their defects, since they are highly complementary to each other. As a result, this collaborative model could define new challenges, which pushes us to rethink how to use the combined resources across networks as well as where to select an optimal service among cloud or fog platforms. Notably, the growth of edge/cloud services imposes the need for comparison of their functionalities (i.e., performance) before starting the selection process. For solving this issue, middleware is required to enhance the communication between this collaborative model and IoT applications. In this case, the middleware could interact with centralized or decentralized platforms and choose which one of them could offer services on a smaller scale in real-time. Yet, the middleware must be adapted to manage the selection of the centralized or decentralized services. Also, it should guarantee the integrity and availability of suitable services for the IoT end-clients. Consequently, we identified the following research questions: What are the most critical factors that are necessary for developing anticipatory middleware of users' requests? and how could the middleware ensure the scalability, reliability, and elasticity of services selected from edge or cloud platforms?