## 1 Introduction
During the past few years, a number of pilot deployments have been realized that constitute the first smart water grids, allowing water utilities to improve optimization of system operation, manage leakage control more effectively and reduce the duration and disruption of repairs and maintenance. WaterWiSeis an integrated, end-to-end platform for real-time monitoring of water distribution systems deployed in down town Singapore [19]. More recently, a pilot smart water grid was deployed in Mori, a village in the East Godavari district in Andhra Pradesh situated near the Bay of Bengal. The water grid management system deployed involves different sensors that measure the quality of water, provide an alert mechanism that notifies the different levels of authorities and allow remote control of the locks that have been employed in and around the village to control the flow of water in a timely manner [20]. An inexpensive, open-source, water metering system was deployed at the Utah State University to help to measure water use quantity and behaviour at high temporal frequency [6]. These pilot studies provide interesting indications of how smart water grids can improve the operational efficiency of the water supply system in the city and rural locations. They provide clear evidence that integrated, on-line decision-support systems based on continuous in-network monitoring of hydraulic and water quality parameters can help water utilities better manage the ageing water distribution infrastructures that encounter failures with increasing frequency and also end-users optimize water consumption and adopt environmentally friendly behaviours. Today, the dominant architecture implemented in smart grid deployments is cloud-based, where collected data are transmitted to cloud services for storage, integration and big data analysis. A detailed analysis of the enabling technologies for the smart water quality monitoring system related to data acquisition, data transmission and data processing was explored in [21]. Unfortunately, cloud data centre deployment around the globe is conducted in a centralized way, rendering it geographically secluded for large numbers of end-users. Although providers have intensively tried to increase their Points of Presence (PoP) and seamlessly unify their infrastructure using ultra-high-speed connections, users are still experiencing increased round-trip delay, network congestion, as well as service quality degradation. As anticipated, these constitute compromising factors for latency-sensitive applications, which need to be handled in a real-time manner. In addition, due to the rapid growth in a number of interconnected devices, their diverse characteristics and the minimum functional requirements, it is of paramount importance to introduce a novel, most probably heterogeneous, architecture to tackle some of the fundamental functionality issues and shortcomings of the existing ecosystem. Very recently, an alternative approach has been proposed, so-called fog computing, which utilizes the computational resources already available throughout the network infrastructure to enable a fine-grained analysis of the smart meter data in a more optimized manner [22; 23]. The recent developments of the upcoming Fifth-Generation communication network backbones (5G) are expected to influence the development of fog computing with huge benefits with regards to response times, transmission delays, and energy management costs in delay-sensitive applications [24]. The hierarchical structures of cloud-fog computing can provide different types of computing services that improve resource management in smart grids [25; 26]. Evidence from real-world deployments indicates the benefits of middleware technologies of storing and processing smart meter data within the smart devices and the network hierarchy [27; 28; 29; 30].