Comprehensive Analysis of Resource Allocation and Service Placement in Fog and Cloud Computing

Abstract—The voluminous data produced and consumed by digitalization, need resources that offer compute, storage, and communication facility. To withstand such demands, Cloud and Fog computing architectures are the viable solutions, due to their utility kind and accessibility nature. The success of any computing architecture depends on how efficiently its resources are allocated to the service requests. Among the existing survey articles on Cloud and Fog, issues like scalability and time-critical requirements of the Internet of Things (IoT) are rarely focused on. The proliferation of IoT leads to energy crises too. The proposed survey is aimed to build a Resource Allocation and Service Placement (RASP) strategy that addresses these issues. The survey recommends techniques like Reinforcement Learning (RL) and Energy Efficient Computing (EEC) in Fog and Cloud to escalate the efficacy of RASP. While RL meets the time-critical requirements of IoT with high scalability, EEC empowers RASP by saving cost and energy. As most of the early works are carried out using reactive policy, it paves the way to build RASP solutions using alternate policies. The findings of the survey help the researchers, to focus their attention on the research gaps and devise a robust RASP strategy in Fog and Cloud environment.


I. INTRODUCTION
Digitalization has revolutionized anything as a service (XaaS) on pay per usage basis [1]. With the increase in smart handheld devices, online business, transportation, health care, education, and food court which were once a commodity, are delivered as a service at the doorstep of the individual. These digital services produce and consume a variety of voluminous data, at a rapid speed that needs to be stored for big data analytics [2]. Consequently, enterprises depend on cloud Data Centers (DC) to store, process, and manage their data [3], [4].
A large number of commercial Cloud Service Providers (CSP) deliver compute, storage, and communication resources in the form of Infrastructure as a Service (IaaS) [5]. Estimating the required amount of IaaS resources and assigning the service (tasks) for execution is termed as Resource Allocation and Service Placement (RASP) [6] [7]. Service is defined as the actual software instance that executes a task. The terms service and tasks are often used interchangeably [8].
A RASP framework abides by the Service Level Agreement (SLA) made between consumer and service provider [9] [10]. SLA is the mutual agreement cum negotiation made between the service consumer and the CSP. Providing guaranteed resources to the consumers/applications on time aggravates many challenges. Inaccurate estimation of available resources, wrong forecast of workload, incorrect prediction of required resources, deadline violation, uncontrolled energy consumption, unexpected failures of hardware/software, SLA Violation (SLAV) are some of the other problems encountered by a RASP framework. Hence, a robust RASP that benefits the consumer and the service provider in terms of their requirements and revenue is needed.
Resources are allocated to the requesting services by either of the three policies viz., Reactive, Predictive, or Hybrid. In reactive policy, the initial allocation of resources is subject to change, only after the system enters an undesirable state. The reactive policy follows a predefined set of rules for scaling the resources. On the other hand, the predictive (also known as a proactive) policy, anticipates the forthcoming disruptions in advance, and updates the resources, well before the system enters the undesirable state [11]. It forecasts the workload and scales the resources in advance to meet future needs. The hybrid approach is an amalgamation of both the reactive and proactive policy [5].
Each policy bears its own cost in satisfying the SLA. The choice of policy purely depends upon the application and the RASP strategy adopted. Out of the works considered from the period 2011 to 2020, Table I shows that most of the works were carried out in the reactive policy, which opens the research gap in other policies to model RASP. Fog Computing (FC) is a computing paradigm where a huge number of ubiquitous, decentralized, heterogeneous, geodistributed devices provide computation, storage, and communication facility at the edge of the local network from where the devices/objects generate and consume data [13]. It accelerates awareness cum response to events by eliminating RTT (Round Trip Time) to the cloud and avoids failures during peak period. As such, not all requests are serviced in Fog. Some of the delay-tolerant applications that involve huge computation are processed in the cloud [14] [15]. In fact, Fog complements Cloud to realize its potential with IoT applications.

C. Relevance of Reinforcement Learning (RL) in RASP
The design and implementation of RASP for the growing scale of IoT, require intelligence that is far beyond the capacity of the case-driven programming style [16]. Such programs depend on predefined rules which is hard to change instantaneously for the stochastic needs of IoT [17]. A robust RASP requires an approach like Reinforcement Learning which learns the environment (requirement and availability of resources) and maps the appropriate action on the fly.
RL is an Artificial Intelligence-based technique that automatically learns to make decisions under a dynamic environment without prior domain knowledge [18]. When service providers suffer to handle the complexity of stochastic requests in real-time, RL-assisted RASP, delivers better service in both Cloud and Fog.

D. Energy-Efficient Computing (EEC) in RASP for Green Environment
The rapid growth of DC has become the highest consumer of power that leads to the dissipation of Green House Gas (GHG) [5]. Compute and non-compute resources incur abundant energy waste [17], [19]. Measures taken to control the speed of processors, frequency/voltage, and switch-off/sleep modes, are not sufficient to reduce the effect of GHG emission [20]. Hence, an EEC-based RASP that enables sustainability of the Green Environment with minimal operational expenses is required.
An illustration of the coordinating computing models is shown in Fig. 1. It portraits the association of the Edge-Fog-Cloud computing paradigm in association with the application requests. The Fog Controller embeds the Reinforcement Learning and Energy-Efficient Computing components to achieve an efficient RASP system. The rest of the paper is organized as follows. Section 2 reviews the existing literature works in RASP. Section 3 analyzes the RASP works in cloud datacenters. Section 4 discusses the approaches made in RASP using RL techniques while Section 5 presents EEC-based RASP. Section 6 discusses the efficacy of FC in addressing IoT applications and elaborates on the existing Fog based RASP works. Then the proposed survey concludes with a discussion on identified research gaps that could be useful to the research and development community in the future.

II. OVERVIEW OF EXISTING SURVEYS
This section analyzes the existing survey papers of RA, in Cloud Computing, RL, EEC, IoT, and Fog Computing. Resource provisioning and application management often exclude issues like unpredictable workload, poor utilization of resources, and unexpected Hardware (HW)-Software (SW) failures. The brownout paradigm that addresses such issues by enabling/disabling the optional parts of the application was presented in [21].
In [22] the author reviewed energy efficiency in four dimensions: (i) Virtual Machine (VM) placement, (ii) VM migration, (iii) Server consolidation, and (iv) Dynamic Voltage Frequency Scaling (DVFS). In [23] the author explored energy management techniques at the HW level, Resource Management (RM) level, and application level. While Static Power Management (SPM) technique was used at the HW level, Dynamic Power Management (DPM) was tackled at the RM level. Green Computing with renewable energy was recommended at the application level.
Maximization of resource utilization and minimizing the cost were the main goal of Resource Allocation (RA) in the IoT environment [24]. Scarce processing-storage capacity, low battery level, less bandwidth, and, poor implementation of resource management protocol were shortlisted as limitations of IoT. Lightweight container-based virtualization was suggested to process and store IoT applications. Though Cloud supports IoT, Fog computing resolves the time-sensitive-issues of IoT more diligently.
Application placement, resource scheduling, task offloading, and load balancing, were explored in [25]. distinguished Fog, from Multi-Access Edge Computing (MEC) and cloud, in terms of operation mode and application addressed [4]. In [15], the author identified the challenges faced by Fog computing to process context-aware applications of IoT. In [3], RA and task scheduling were considered as one of the key challenges in IoT. The survey suggested CloudSim, MATLAB, and iFogSim to implement RA in Cloud and Fog. 63 | P a g e www.ijacsa.thesai.org The author recommended container-enabled micro-services to resolve the resource limitation problem.

III. ANALYSIS OF RASP IN CLOUD COMPUTING
Cloud is a ubiquitous technology that offers infrastructure, software, and platform as service on-demand with the least interaction and management effort of the service provider [26], [27]. Despite its control over the IaaS management, CSP lacks knowledge about the application hosted in their machines. VMs of different applications overlap on physical servers leading to catastrophic failure which is not recognized by the CSP instantly.
Deployment of multi-tier applications is yet another complexity, as the configuration of VMs in one tier differs from the other causing interoperability problems [28] [29]. This section analyzes the existing RASP works in Cloud. While certain works adapt their own architecture, others follow the specific algorithm for the existing RASP. Table II shows the distribution of existing RASP articles under various criteria.

A. Uncertainty in Resource Availability
Unexpected HW failures, SW faults like overflow conditions, malware, DoS (Denial of Service) attacks, and changes in the number of objectives during execution are some of the uncertain behavior projected in [30]. Power consumption cost and overestimation of resources hinder the profit of the CSP due to which certain objectives like deadline and makespan are ignored/altered while deliberating RASP. As HW/SW failure is unavoidable, the Neural Network based Dynamic Non-dominated Sorting Genetic Algorithm (NN-DNSGA-II) converges before the occurrence of the next failure. Change in the number of objectives at runtime is tackled by a generalized periodic change in the objective size.

B. Impact of SLA/QoS in RASP
The applications that are hosted in DCs expect the utmost performance in terms of low latency and high throughput within budget and specified deadline. These performance measures form the QoS requirements. The mutual negotiation between the consumer and the CSP for a guaranteed QoS results in SLA. With the growing number of IaaS providers, not only does it require expertise but is time-consuming for the clients to select an efficient CSP. The RA framework in [9] follows the Technique for Order of Preference by Similarity to Ideal Solution (TOPSIS) in which the available IaaS resources are ranked by their similarity index concerning the application requirements. Then, the top IaaS resource was allocated to the corresponding application.
Lack of CSP's knowledge about the message arrival rate and length of the Enforcement Period (EP) were the problems encountered in satisfying SLA. To overcome the loss caused by SLAV, a RA mechanism that allows an additional EP to execute the unpredictable IoT traffic is recommended by [10]. Execution speed and deadline were considered as primary QoS constraints in [12].

C. Slashdot Prediction in RASP
Slashdot refers to the unpredictable flash crowd workload on the Internet at any instant of time [31]. A sudden traffic surge makes the RASP framework unstable. The Slashdot effect if not addressed properly, leads to a cascade of problems like unacceptable delay, long downtime, application unavailability, revenue reduction, and losing the customer in the worst case.
Conventional predictive policies turn failure as they forecast the expected workload traffic, only a few steps ahead during which the Slashdot effect remains invisible. The Long Short Term Memory Recurrent Neural Network (LSTM-RNN) technique that predicts the workload traffic/pattern a thousand steps ahead was implemented in [32]. Based on the prediction provided by LSTM-RNN, resource scaling was performed without compromising SLA.
The performance of Virtualized Multi-Tier Application (VMTA) for the unstable workload was analyzed using the queuing network in [29]. Apache, Tomcat, and MySQL servers were used for the front end, application, and database tiers, respectively [33]. A Generalized Priority Algorithm (GPA) for scheduling tasks in the cloud, consumed the least execution time when compared to the First Come First Serve method.

D. Need for Elasticity in RASP
Resource elasticity refers to the automatic acquisition and release of resources at runtime to fulfill the QoS requirements in response to the changing workload. Though the workload traffic is predicted in advance, RA without an elasticity component is a failure, as neither the resources are efficiently scaled nor is the QoS met [34]. The QoS aware resource elasticity framework for multi-tier application was modeled in [28]. The framework employed MT-PerfMod (Multitier Performance Module) to compute the overall response time and resource utilization, based on which, the MT-ResElas (Multi-Tier Resource Elasticity) module computed the SLAV rate. Whenever the response time and the resource utilization rate were violated, VMs were increased; otherwise, the number of VMs was reduced by half.

E. RASP on ASP (Application Service Provider) Point of View
The majority of RA is performed from the CSP point of view, which reduces the preference for ASP. The ASP is charged for the resources that were wasted due to underutilization. Hence, an ASP (tenant) centric RA for scaling the application was modeled in [31] [34]. The knapsack problem approach was implemented to predict the minimum number of VMs required.
Though the maximum number of VMs required was estimated in advance, it keeps changing depending upon the number of active users who access the application. The problem arises when the ASP (consumer) is charged for the idle resources. An SLA-based RP mechanism in the ASP point of view was presented in [35]. A framework where clients and operators suggest their preference for RA policies was presented in [36]. The technique described the allocation of jobs to a machine, based on the stable matching algorithm. Tables IIIA and IIIB tabulate the observations of the RASP works in Cloud Computing. The human-to-machine and machine-to-machine interaction-based IoT applications demand a technique that makes the optimal decision at high speed. The traditional rulebased programming approach does not withstand the stochastic requirements of IoT. Hence, a machine learning programming approach that observes and adapts to the environment is required. Such requirement leads to the choice of Reinforcement Learning (RL) which automatically learns to take decisions by trial and error method under a dynamic environment with prior domain knowledge. Fig. 2 depicts the basic structure of RL.
In RL based RASP, service request and the resource pool forms the environment. The values like the expected number of service requests and the amount of available resource observed at any instant of time form the state. At every time-step of interaction, the state values form the input to the agent from the environment. Action is the decision taken to place the service request in the appropriate resource. The agent chooses its action in such a way that the system achieves maximum resource utilization with minimum cost. For every action taken, the agent receives a suitable positive or negative reward as an incentive. By trial and error, the agent tries to maximize its reward by taking optimal decisions (actions) in the long run.
The agent is trained to take optimal action through either of the RL algorithms like Q-learning, SARSA, E-SARSA, or Deep RL. The choice of the RL algorithm depends on the type of problem encountered and the feasibility of implementation. This section analyzes the RL-assisted RASP works for the categories given in Table I.  A. RL based RASP for F-RAN (Fog-Radio Access Network) Fifth-generation wireless communication is an emerging solution to the expectations of ultra-low latency, minimized energy consumption, and high throughput [37]. Cloud-based Radio Access Network (C-RAN) used base stations, remote radio heads as resources to process IoT applications. But, the unlimited IoT traffic imposes a heavy burden, turning the C-RAN less efficient for IoT applications. Employing RL assisted Fog nodes in the front-haul alleviated the cloud's burden, and elevated Fog-RAN (F-RAN) as a promising solution to tackle time-critical applications of IoT [39]. RLenabled RASP in F-RAN has the advantage of local processing and distributed storage capability at the vicinity of the end-user resulting in high resource utilization [37].

B. Job Rejection Rate and Customer Retention in RL based RASP
Enterprises look for CSPs to host their applications for online business. A CSP is chosen based on the service quality they provide. But, in the CSP viewpoint, a job is rejected under certain circumstances: (i) If the job cannot be completed within the deadline even after using a large number of resources, (ii) if the estimated resource capacity is greater than the available resource capacity (iii) frequent change of requirements from the client-side. The increase in DCs has driven competition among the CSPs to attract and retain customers. Though the CSPs advertise a low price, consumers do not prefer them due to the diminished QoS they offer. [38] Hence, to avoid customer loss, CSPs adopt an optimal resource provisioning policy like RL-DRP (Reinforcement Learning based Dynamic Resource Provision).

C. Quality of Experience (QoE) in RL based RASP
In [40], the author addressed the issues of RA and achieved QoE through Smart Content-Centric Services for IoT applications (SCCS-IoT). The algorithm employs RL based Mapping Table (RLMT) to update/maintain the cost mapping table. Each IoT task is an n-tuple to represent m number of costs (energy, latency, bandwidth, execution time). The allocation path and the quality level represented the state of the environment. Each update that was carried out on the table represented the action. The sequence of costs formed the feedback. The updated cost mapping table forms the input to the second algorithm called, RL-based RA (RLRA) that generated a policy to obtain an optimal RA for the incoming tasks.

D. Auto Reconfiguration of VMs in RL Assisted RASP
Large-scale application deployment demands adaptive techniques like RL-based RASP that dynamically configure/reconfigure the VMs and the application requirements, as needed. The RL-based framework called CoTuner synchronizes the configuration of VMs and the applications hosted in it [41]. VMs and applications in the cloud were auto-reconfigured at an optimal range to improve the resource utility and application performance in [42]. Dynamic resource configuration through RL was suggested in [43]. The delayed learning process of RL was overcome by a value-function that converged the optimal learning policy at a fast rate.
A self-adaptive learning agent called iBalloon handled the dynamic capacity management of each VM in [26]. iBalloon was based on RL in which utilization of the CPU, memory, and I/O are considered as the state of the environment. The action to be taken was of the form (no-operation, scale-up, scaledown) on the VM's resources. The Decision Maker (DM) module computed the required resource capacity. The Host Agent module monitored and reconfigured VM's resources. Any deviation from the SLA was reported back to the DM that updated the capacity management. The observations of the existing works on RL-assisted RASP are tabulated in Table V.

V. ANALYSIS OF ENERGY EFFICIENT COMPUTING (EEC) ASSISTED RASP
With the proliferation of DCs, the CAGR (Cumulative Annual Growth Rate) of carbon emission is expected to cross 11% worldwide, which is a serious threat to be handled immediately [5]. Hence, an EEC-based RASP that minimizes energy consumption and carbon emission is required [44]. The EEC-assisted RASP is classified as thermal aware and poweraware energy management as shown in Fig. 3. In general, thermal aware energy depends on the number of resources involved rather than the temperature density of those resources. As power is directly proportionate to the temperature density of the resources, the proposed survey focuses on power-aware energy management [23].
Energy management through Load balancing tackles the overload and underload aspects of resources, only after the tasks are scheduled. Whereas, RA approach handles energy management by predicting the power consumption in advance and optimizes the resource utilization [22]. This section discusses the works related to EEC-assisted RASP under various criteria as shown in Table VI.

A. Minimization of Energy Cost and Latency
Energy consumption and latency reduction in Fog computing were implemented in [16]. In the health care case study, the Medium Access Control (MAC) scheduler allocated the available time slots in Time Slotted Channel Hopping (TSCH) frame to the requesting sensors, by an equally spaced method. Cloudlet (an interface node between the mobile device and cloud server) assisted with Dynamic Energy Cost Minimization (DECM) technique was adopted to reduce the energy cost in [19]. Whenever applications are invoked through mobile, the DECM finds the cloudlets that reside near to the CSP. Then, the mobile request is forwarded to the recommended cloudlet.

B. Energy Conservation through PUE and DCiE
Power Usage Effectiveness (PUE) and DC infrastructure Efficiency (DCiE) were referred to in the RA framework to compute the power consumption of a DC in [18]. PUE is the ratio of the power consumed by IT equipment to the power consumed by the total IT facility. But, DCiE is inversely proportional to PUE [23]. The framework senses the state (number of physical hosts) of the DC and takes actions (allocate or not allocate), respectively.

C. Energy Conservation based on VM Placement, Migration, and Server Consolidation
VM migration is the process of transferring the process of the selected VMs from one host to another, to avoid overutilization or under-utilization issues [22]. VM migration enables server consolidation by utilizing only the optimal number of servers thereby shutting down the unused servers in [17]. To reduce energy consumption, the Modified Best Fit Decreasing (MBFD) algorithm [44], arranged VMs in decreasing order of CPU utilization and allocated them to the highest power-efficient host. The algorithm aiCloud optimized the total power consumption, by switching the idle and underutilized physical machines to a power-saving state or offline state (hibernate/ sleep/standby) in [45].

D. DVS/DVFS based Energy-Efficient Computing
The growth in the number of DCs has become a huge consumer of power. Scaling down the frequency/voltage, at the level of processor, memory, HDD, and NIC were the techniques employed to save power consumption in general. DVFS scaling that controls the frequency and voltage to maintain optimal performance was employed in [46]. The architecture specified the minimum and maximum frequency to run a job as one of the requirements, based on which the DVFS was programmed.
An Autonomic Workload and Resource Management framework (AWRM) that reduced power consumption by predicting the workload was employed in [47]. [20] [48] presented an energy-saving and carbon footprint reduction model where the processor frequency was reduced instantly, once it turned idle. The author proved that with the right combination of optimization policy and power prediction model, energy consumption was reduced by 20%.  The term Fog computing was proposed by cisco systems in 2012. Cisco defines Fog as a computing architecture that extends the capabilities of the cloud closer to the things that produce and act on data. The IoT devices that produce and consume data are located in the edge network. Fog computing resides as a middle layer between the edge network and the cloud as shown in Fig. 1. The proximity of fog nodes near the edge network guarantees minimum bandwidth and latency for time-critical applications. A well-defined RASP strategy in Fog layer helps IoT realize its potential. The Fog computingbased RASP works considered for the survey are categorized in Table VIII.

A. Profit-Cost Oriented QoS in RASP
The profit-centric service provider saved their cost by employing an optimized RA model that guaranteed less response time in [8]. An empirical approach that maximized Fog utilization and minimized cost was presented in [49]. A RA strategy that maximized the profit of both the resource provider and consumer was suggested in [50]. The contradiction between price and time in completing a task was resolved through Priced Timed Petri Nets (PTPN) in which the required resources were chosen from a group of pre-allocated resources.
Besides other requirements, the cost is a significant QoS metric for both the service provider and the user [51]. A Cost aware Fog RA for the medical cyber-physical system was presented in [51]. While the base transceiver station was employed as a fog node, the data transmission rate, delay, and service rate were the QoS metrics used to compute the total cost in allocating the resource.

B. RASP based on Resource Utilization Oriented QoS
Resource utilization is the allocation of available resources among the competing tasks within the budget as specified in the QoS. The price of a resource depends upon whether it is over-demanded or under-demanded. A market equilibrium framework that balanced the interests of both the service (buyer) and the Fog resource (goods) was employed in [52].
A two-sided matching game problem that stabilized the association of Fog and IoT to maximize resource utilization was presented in [53]. The higher resource utilization rate indicated its optimal consumption which in turn reduces the carbon emission. A proximal algorithm that assured utilityoriented RA and reduced carbon disposal was suggested in [54].

C. RASP based on Quality of Experience (QoE)
Quality of Experience (QoE) is the key factor to evaluate the service satisfaction of the end-user. QoE varies with the expectation of the end-user. While certain consumers are satisfied with minimal latency and bandwidth, others prefer saving the cost. An efficient RASP strategy that enhanced the QoE of mobile users was described in [55]. A RA model that enhanced the QoE of IoT users in terms of cost reduction through the game theory approach was implemented in [56].

D. RASP based on Bandwidth Oriented QoS
The geographical distance and insufficient bandwidth issues of the Cloud were overcome by the Fog enabled Cloud architecture called ROUTER (ResOUrce management TEchnique for smaRt homes) [57]. ROUTER ensured minimum bandwidth and response time through the Particle Swarm Optimization algorithm. The algorithm found the best resource for a job (particle) through fitness value (sum of weighted values of required energy, bandwidth, latency, and response time).
Bandwidth aware Component Deployment Problem (CDP) was presented in [58]. The backtrack search algorithm picked a compatible Fog node to deploy a component (IoT request). The compatibility was verified in terms of the HW-SW requirement, communication link, and bandwidth capacity. When the requirement matched, the component was deployed in the Fog node, otherwise, the search was repeated to find a compatible Fog node. The author implemented a preprocessing procedure to reduce the search time of the Fog node.

E. QoS of Latency, Round Trip Time (RTT), Delay and Response Time
As far as Industrial IoT is concerned, a minimal delay is the most expected QoS metric. Even Fog suffers the delay caused by the VM boot time. Hence, virtual containers that consumed less memory and instantiation time was suggested as Fog resource in [7]. The Gaussian Process Regression for Fog-Cloud Allocation (GPRFCA) was employed to decide, whether a request is to be processed in Fog or Cloud in [59]. A QoSaware Fog Service Placement Problem (FSPP) that reduced execution cost and response time was recommended by [60].

F. Fog Radio Access Network (Fog-RAN)
The scarcity of Fog resources was overcome by employing the fronthaul devices of the cellular network as fog devices in [39]. A loosely coupled architecture for emerging 5G networks of Fog-RAN was recommended by [39]. The architecture encouraged the participation of more Fog nodes to lessen the burden of the fronthaul on cellular networks.
A RA scheme with the radio spectrum and Fog nodes as the resource was implemented through the student project matching algorithm in [61]. The service provider maintained the list of radio spectrum and Fog resource pair to which the request was matched as per the preference of the users. The base transceiver stations, Wi-Fi access points, and femtocell routers upgraded with CPU and memory capacity served as Fog nodes to deliver ultra-high-speed latency for IoT applications in [61]. 73 | P a g e www.ijacsa.thesai.org

G. QoS-SLA based RASP in Fog Computing
With scalability being a challenge to Fog, the author suggested sharing computing resources from mobile users as Fog nodes in [62]. Incentives were provided to the mobile owners who contribute to the resource pool. A Fog-Cloud federated IoT RASP architecture that optimized resource utilization and data distribution was presented in [63].

A. Identified Research Gaps and Future Enhancements
The survey explores different strategies to solve the RASP problem under various domains viz., Cloud, Fog, RL, and EEC. In the effort to solve the RASP problem arises many sub problems. Resource scalability, over-provision/under-provision of resources, violation of cost, budget, and time constraints are some of the subproblems that need to be addressed while implementing an effective RASP system. Especially, in the case of IoT applications where the requirements are stochastic and delay-sensitive.
Most of the RASP works were carried out using reactive policy. Though reactive policy incurs less cost, its case-driven programming approach does not withstand the time-sensitive requirements of IoT applications. Hence, adapting machine learning-based proactive and hybrid policies gives an effective. 74 | P a g e www.ijacsa.thesai.org Solution. In general, the existing works were from the service provider's point of view saving their cost. A RASP strategy that prioritizes consumer's profit, needs focus. Deployment of multi-tier and parallel applications in fog nodes is another issue that needs attention.
The unexpected network traffic and access rate of the hosted applications were not foreseen during SLA. This leads not only in the violation of QoS requirements but some catastrophic failures of resource access. Hence dynamic provision, to monitor and configure the resources automatically with intelligence is the need for such a situation. Research on autonomic computing that possesses self-management capability will enhance the RASP strategy.
The proliferation of IoT requires unlimited bandwidth. The huge number of heterogeneous geo-distributed devices involved in the fog layer that handles IoT consumes enormous energy. Instead of draining the available energy, fog nodes that work on solar and green energy should be brought into usage. Hence, a Fog-based RASP solution that supports green environmental sustainability needs focus.
The manufacturing units in Industry, nowadays depend on Fog services for instantaneous processing. But, the protocol interoperability problem between the assembling units and Fog devices causes a delay that is not tolerable in Industrial IoT. With fewer works carried out in this area, it remains yet another open challenge in Fog research.
Findings show that based on the delay constraint of the applications, the arriving requests are segregated among the Cloud and Fog for processing. But, the question arises how the decision is made when the delay constraint is not explicitly mentioned. One possible approach is that the Cloud/Fog center can be decided based on the application type. Service requests from critical health-care, disaster management, real-time chemical reactors, and Industrial IoT can be considered as emergent applications that need to be processed in the Fog layer.
Further, the efficiency of the RASP system can be escalated by clustering the fog nodes on application basis for processing. Instead of making all fog nodes available for processing, certain fog nodes can be employed for general purposes while the rest of the fog nodes can be reserved exclusively for emergent applications. Algorithms are to be devised that ensure maximum utilization of the fog nodes. The idle fog cluster can be employed either for the migrated emergent applications or for the local non-emergent applications during peak hours. As Fog computing is still in its infancy stage, standard protocols are yet to be explored.

VIII. CONCLUSION
The survey elaborates various RASP strategies in Fog and Cloud environments. The survey investigated the individual work from the viewpoint of, the problem defined, objective set, algorithm adopted, performance metrics addressed, experiment and evaluation tools employed, and the workloads used for testing. The tabulated information presents an exhaustive analysis of the individual work with their limitations projected as open challenges.
Although review articles exclusive to Cloud and Fog exists, the proposed survey explores the RASP problem, in Cloud and Fog for IoT applications. The survey stands unique to employ techniques like Reinforcement Learning (RL) and Energy Efficient Computing (EEC) to save cost and energy respectively. Sure enough, the survey will motivate the researchers to focus on the research gaps and helps them to conceive innovative RASP solutions in the Fog-Cloud federation. 77 | P a g e www.ijacsa.thesai.org