**1. Introduction**

In Smart Grig (SG), Demand Side Management (DSM) with the integration of Information and Communication Technologies (ICTs) is considered as its paramount function. Different electric appliances and control services are scheduled and integrated with DSM. These appliances and services are: shiftable loads, charging and discharging of the electric vehicles, smart devices (i.e., smart meters, Distributed Generators (DGs)), etc. With the development of the massive electricity market, multiple entities are involved on the DSM side: NASDAQ trading organizations of OPower, *C*<sup>3</sup> Energy, etc. [1–3]. In order to optimize the energy management on demand side, these organizations apply existing techniques for the bidirectional interactions and online processing facilities. Multiple small businesses and standalone buildings are also contibuting in the electricity market on DSM in order to engage themselves in the development of the SG applications [4].

There are two significant aspects which are required to be considered in future DSM based on the above-mentioned scenarios. These aspects are the technical aspect and the economical aspect. The technical aspect considers the huge size data of the appliances which means the number of appliances used in the smart buildings, their power ratings, their On and Off status, and scheduling horizons. It needs to be processed by considering the specific time constraints for maintaining its computational complexity. Computational complexity consists of the resources which are required for executing the consumers' requests. The time required to respond to the requests is considered as Processing Time (PT) in our scenario and it is maintained by fulfilling the consumers' comfort preferences. Secondly, the economical aspect focuses on most of the newly developed buildings and businesses which are not participating in the ICT framework in new stages. It becomes complex to maintain its reliability without their participation in this case. Hence, allocating the ICT facilities: processing power, storage capacity and availability of the resources are the critical problems [5,6]. A flow diagram of cloud computing to its entities is shown in Figure 1.

**Figure 1.** Flow Diagram of Cloud, Utilities, Consumers, Substations and Microgrids (MGs).

The management of computation, storage and on-demand resource availability from grid and electricity scheduling for the consumers is handled by cloud computing. Cloud computing resolves both technical and economical aspects of these (computation, storage and on-demand resource availability) problems. It is also the enhanced version of the parallel and grid computing. Fog computing is the specialized model of the cloud computing which is responsible for efficient management of the consumers' resources on the edge of the network. It upgrades the locality, reliability, security and latency of the consumers' demands [7–9].
