A Systematic Survey on the Role of Cloud, Fog, and Edge Computing Combination in Smart Agriculture

Cloud Computing is a well-established paradigm for building service-centric systems. However, ultra-low latency, high bandwidth, security, and real-time analytics are limitations in Cloud Computing when analysing and providing results for a large amount of data. Fog and Edge Computing offer solutions to the limitations of Cloud Computing. The number of agricultural domain applications that use the combination of Cloud, Fog, and Edge is increasing in the last few decades. This article aims to provide a systematic literature review of current works that have been done in Cloud, Fog, and Edge Computing applications in the smart agriculture domain between 2015 and up-to-date. The key objective of this review is to identify all relevant research on new computing paradigms with smart agriculture and propose a new architecture model with the combinations of Cloud–Fog–Edge. Furthermore, it also analyses and examines the agricultural application domains, research approaches, and the application of used combinations. Moreover, this survey discusses the components used in the architecture models and briefly explores the communication protocols used to interact from one layer to another. Finally, the challenges of smart agriculture and future research directions are briefly pointed out in this article.


Introduction
Agriculture plays a fundamental role in the world both as a key source of livelihood and its role in the global food supply chain. It is a foundation of human survival. However, factors such as population growth, expansion of industrial development, and climate change all restrict agricultural development [1]. The UN has projected that the world's population will reach 9.7 billion by 2050 [2]. If these projections materialise, annual world agricultural production would need to increase by some 60 percent between 2010 and 2050 [3]. To meet this demand, farmers, scientists, agronomists, and agricultural industries turn to new technologies, such as Cloud Computing, Edge Computing, Fog Computing, IoT, Big Data, Artificial Intelligence, and Drones.
In recent years, concepts such as smart farming, smart agriculture, or precision agriculture have become more popular [4][5][6]. These concepts are generally regarded as the same, and the terms can be used interchangeably. Smart farming uses the new technologies in the agricultural domain to make maximum use of resources and minimise the environmental impact. Currently, sensors can offer highly accurate measurements of crop status. Based on those values, actuators can manage agricultural processes related to animals, crops, greenhouses, irrigation, soil, and weather. This can result in improvements to harvest forecasting, weather prediction, increase production, water conservation, real-time data collection, and production, lowered operation costs, equipment monitoring, remote monitoring, and accurate farm and field evaluation.
For example, smart home is a well-known application where Fog Computing offers more security, ultra-low latency, and efficient cost and energy [27]. The authors of [27] categorised Fog-based approaches in the smart homes as resource management (scheduling, allocation, provisioning, and load balancing) and service management (monitoring, security, energy management, and remote controlling). Moreover, Fog Computing provides vital support for processing large amounts of data produced and consumed by IoT sensors and devices, tractors, drones, applications, machines, and users. The main difference between Cloud Computing and Fog Computing is that the data can be accessed offline as some amount of data are stored in a local data centre in Fog Computing, but this is not true in Cloud. In comparison to Cloud, energy consumption and operational costs in the Fog Computing paradigm are low [28]. Moreover, the unique characteristics of Fog are low latency, realtime interaction, support for mobility, improvement of security, efficiency, and conserving network bandwidth [29,30]. These unique characteristics make agriculture easy for farmers and agricultural stakeholders. For example, the data collected by all devices may contain sensitive information, and they need to be processed quickly and locally. Therefore, Fog Computing can provide a benefit in such a way to do local processing and analysing without sending to the Cloud.

Edge Computing
Edge Computing is an emerging area where data processing occurs near proximity to mobile devices or sensors. As discussed above, Cloud Computing faces several severe issues due to centralisation. Therefore, Edge Computing has been proposed to improve the performance and overcome problems of Cloud by providing data processing and storage ability at the end devices locally. Ref. [31] stated that Edge Computing refers to the enabling technologies allowing computation to be performed at the Edge of the network, on downstream data on behalf of Cloud services and upstream data on behalf of IoT services. The distinguishing characteristics of Edge Computing from Cloud are dense geographical distribution, mobility support, location awareness, proximity, low latency, context-awareness, and heterogeneity [32]. Edge Computing is more or less the same as Fog Computing in terms of low latency, low bandwidth costs, mobility support, high scalability, and virtualisation service [33]. However, it has more limited resources, limited computation and storage capabilities, and proximity to end devices than Fog [33]. Mist computing is another type of computing that is the extreme edge of a network, typically consisting of micro-controllers and sensors. Mist computing uses microcomputers and microcontrollers to feed into Fog computing nodes [34]. Edge Computing is mainly contributing to agricultural applications such as pest identification, safety traceability of agricultural products, unmanned agricultural machinery, agricultural technology promotion, and intelligent management [35]. Moreover, Edge computing enables the evolution to 5G by bringing Cloud capabilities near to end-users [36][37][38]. However, it is essential to combine Edge with other computing such as Cloud and Fog to get the maximum benefits in agriculture.

Edge Computing and Fog Computing
The above two sections explain the details of Edge Computing and Fog Computing. As mentioned in the previous section, it is common in the literature to find that Edge and Fog Computing are defined as the same concept. The principal aim of these two concepts is to bring Cloud services and resources closer to the edge devices generating data. This section explains the view by other researchers, significant differences, and similarities from reviews on these two paradigms.
As described in a review by [15], the idea of Edge Computing first appeared in the literature in 2004-2005 with the concept of pushing the application logic and data to the edge of the network. However, as mentioned before, Fog Computing was first mentioned and defined in 2012 by Flavio Bonomi at CISCO. Some authors believe that Fog Computing is one of the classifications of Edge Computing [32,35]. For example, Ref. [32] mentioned Cloudlets, Mobile Edge Computing, and Fog Computing as classifications of Edge. Other authors consider Edge as another type of Fog Computing [39][40][41]. The Open Fog Consortium [42] revealed that Fog Computing is often erroneously called Edge Computing, but there are key differences. Fog works with the Cloud, whereas Edge is defined by the exclusion of Cloud.
In addition to computation, Fog also addresses networking, storage, control, and acceleration. Table 1 explores key differences between Fog and Edge.

Recent Reviews on Smart Agriculture
In the past few decades, research on smart agriculture and IoT has become more popular. While reviewing the existing research on Cloud, Fog, Edge, or IoT-based smart agriculture, a few papers were chosen as relevant to this study and analysed based on the requirement of this section. The research papers such as [10,[43][44][45][46][47] are the latest review papers on smart agriculture/smart farming and IoT, and Ref. [35] is the latest review on Edge Computing in the agricultural Internet of Things. A significant number of publications and reviews published in 2020, in recent years, clearly show that researchers are very much interested in the field of smart agriculture where applying IoT and other new computing technologies such as Cloud, Fog, and Edge.
Talavera et al. [48] surveyed IoT applications for agro-industrial and environmental fields from the papers published between 2006 and 2016. The authors of this paper classified four application domains corresponding to monitoring, control, logistics, and prediction. Moreover, infrastructure and technology used by IoT solutions in agro-industrial and environmental fields were organised into seven groups such as sensing variables, actuator devices, power sources, communication technologies, Edge Computing technologies, storage strategies, and visualisation strategies. The authors explored the areas of communications, energy management, monitoring, and logistics for agro-industrial and environmental applications published between May 2016 and July 2017. They also considered limitations and challenges discussed and proposed an IoT architecture for agro-industrial and environmental applications.
Farooq et al. [43] conducted a comprehensive survey on the state-of-the-art for IoT in agriculture. In this paper, authors discussed significant components of IoT based smart farming along with relevant technologies (Cloud and Edge Computing, Big Data analytics and machine learning, communication networks and protocols, and robotics), the network architecture of IoT involving network architecture and layers, network topologies used, and devices and protocols used in agriculture IoT. Moreover, this survey analysed application domains, relevant smartphone, sensor-based applications, and security and privacy issues in IoT-based agriculture.
Farooq et al. [44] presented a systematic study on IoT agricultural applications, sensors/devices, communication protocols, and network types. The authors also discussed the main issues and challenges: security, cost, inadequate knowledge of technology, reliability, scalability, localisation, and interoperability in agriculture. Additionally, this survey presented country policies for IoT-based agriculture.
In 2020, Navarro et al. [10] conducted a review on IoT solutions for smart farming, identifying the primary devices, platforms, network protocols, processing data technologies, and the applicability of smart farming with IoT to agriculture. This review also shows an evolution in the way data are processed in recent years and the types of network connections such as wired networks which are used in indoor scenarios (e.g., greenhouse), and wireless networks, which are used both in indoor and outdoor scenarios (e.g., arable lands, orchards). To the author's knowledge, agricultural applications of IoT solutions are categorised as chemical control, crop monitoring, disease prevention, irrigation control, soil management, supply chain traceability, and vehicles & machinery control. This article found that an increasing number of management systems use complementary technologies that rely on Cloud and big data computing to process large amounts of data.
Zhang et al. [35] presented the concepts related to Edge Computing and agricultural IoT and investigates the combination of Edge Computing and Artificial Intelligence, Blockchain and Virtual/Augmented reality technology in the application of pest identification and crop classification, agricultural product safety traceability, unmanned agricultural machinery, and agricultural product promotion. Furthermore, the authors of this paper conducted a review on the challenges of Edge Computing such as task allocation, data processing, privacy protection and security, and service stability in agriculture.
Glaroudis et al. [45] surveyed IoT messaging protocols that are regarded as major options for IoT applications in smart farming. The authors presented, based on the most recent literature, seven protocols (MQTT, CoAP, XMPP, AMQP, DDS, REST-HTTP, and WebSocket), analysed and compared with respect to their performance, and measured in terms of relevant key indicators (latency, energy and bandwidth requirements, throughput, reliability, and security). The authors concluded that, currently, the safest option seems to be the MQTT protocol, either when it is applied in end-to-end network architecture or when a gateway-server architecture is used to collect the measurements.
Boursianis et al. [46] performed a survey on IoT and UAV technology applied in agriculture and described the main principles of IoT technology, including intelligent sensors, IoT sensors types, networks and protocols used in agriculture, as well as IoT applications and solutions in smart farming. The article also presented the role of UAV technology in smart agriculture by analysing the applications of UAVs in various scenarios, including irrigation, fertilisation, use of pesticides, weed management, plant growth monitoring, crop disease management, and field-level phenotyping. In this review, the authors listed types of sensors that can be used to measure and calculate the parameters of an agricultural field. The types of sensors are soil water content sensor, soil moisture content sensor, soil electrical conductivity sensor, pH sensor, weed seeker sensor, temperature sensor, and wind speed sensor. Furthermore, the article depicted IoT technologies' main applications and benefits in smart agriculture such as WSN, Cloud Computing, Big data analytics, Embedded systems, and communication protocols.
Ferrag et al. [47] surveyed research challenges of security and privacy issues in the field of green IoT-based agriculture. This paper provided a classification of threat models against green IoT-based agriculture into five categories: attacks against privacy, authentication, confidentiality, availability, and integrity properties. This article also provided an overview of a four-tier green IoT-based agriculture architecture with the components of the agricultural sensors layer, Fog layer, the core layer, and the Cloud layer.
In 2021, Friha et al. [49] presented a comprehensive survey on emerging technologies of IoT-based smart agriculture. In this paper, the authors provided a list of technologies such as UAV, wireless technologies, open-source platforms, SDN and NFV technologies, cloud and fog computing, and middleware platforms. Moreover, it is also analysed supply chain management solutions for agricultural IoTs based on blockchain. The papers also provided real-life smart farming projects that utilise emerging technologies and discussed the challenges such as hardware boards, interoperability of systems, networking and energy management, security and privacy threats, hardware and software costs, and education challenges.
Idoje et al. [50] discussed an overview of the various state of the art intelligent technologies on smart farming, crop, animal production, and post-harvesting. The authors also covered the impact of climate on smart farming. Islam et al. in [51] explored different use cases of smart farming, advantages, and applications of implementing IoT and UAVs in agriculture. The authors also discussed open research issues such as hardware maintenance and limited energy resources, security and privacy issues, big data in smart farming, weed detection and management, multi/hyper-spectral imagery for disease and pest control, and automated watering control and management in remote areas.
Although most of the reviews focused on general IoT applications in the agricultural field, which illustrated in Table 2, to our knowledge, no one has explicitly focused on smart agriculture and the combinations of Cloud, Fog, and Edge Computing. The applications are based on only Cloud, and applications based on combinations of computing (Cloud-Fog, Cloud-Edge, Cloud-Fog-Edge) can perform differently in terms of performance and cost. For example, Cloud-only-based innovative applications that deal with vast amounts of data must send or store in a central Cloud. This process is costly on both the edge and cloud side. Furthermore, the data sent to the Cloud may or may not be helpful or necessary. If the application is based on Fog-Cloud, then data processing can be done at the edge of the network, Fog, and only the crucial data can be sent to the Cloud. In this way, intelligent applications can reduce costs and provide real-time data processing with constant and high speed, low latency, and high internet bandwidth. Therefore, there is a need for a separated and specific review on the combinations of Cloud-Fog-Edge computing in the Smart Agricultural domain. In this review, our primary goal is to identify the specific smart agricultural applications which have used Cloud, Fog, and Edge combinations. Our contributions in this work are: provide applications domains which are determined from existing Cloud-Fog-Edge applications, present research approaches for smart agriculture with Cloud, Fog, and Edge, emphasize Cloud-Fog-Edge applications for Smart Agriculture with detailed information of main contributions/achieved objects and components of the architecture, and a brief introduction of the proposed three-layered architecture for smart agriculture. Finally, we also discuss the challenges and future directions in Cloud-Fog-Edge based Smart agricultural applications.

Research Methodology
This research used the Preferred Reporting Items for Systematic Reviews and Meta-Analyses (PRISMA) [52] to conduct this systematic review. This research aims to investigate and provide a review of existing research on Cloud, Fog, and Edge Computing applications in the agricultural field.
Selected search engines and digital libraries were chosen based on their scientific contents and closely related to the objective of this paper. The chosen databases were ACM, IEEE Xplore, MDPI, ScienceDirect, and Springer which is illustrated in Table 3. A total of 2788 articles were obtained from 2015 to the present. From the 2788 resulting articles, 2706 were removed and those that did not contain the concepts searched for (smart agriculture or smart farm or precision farm or precision agriculture, and Cloud, Fog, Edge) in their title, as keywords or in summary, in any of their combinations. The abstracts of the remaining 82 were then analysed to see if they satisfied the research objectives and questions. This led to the further elimination of 27 articles, resulting in a total of 55 final articles that were analysed in depth. Thus, data have been obtained for 55 articles, which are analysed in the following sections. These data have been refined and clarified in subsequent stages. A flow diagram illustrating our systematic review of the whole process is shown in Figure 1.

Research Questions and Objectives
The research questions and the rationale of these questions are:

Search String
A search string defined to gather published articles related to the research topics. The strings used in search are "Smart Farm", "Precision Farm", "Smart Agriculture", "Precision Agriculture", "Cloud", "Fog", and "Edge". The publication date of the articles limited to years between 2015 and present. The query used for the database is (("Smart Farm" OR "Precision Farm") AND (Cloud OR Fog OR Edge)) OR (("Smart Agriculture" OR "Precision Agriculture") AND (Cloud OR Fog OR Edge)).

Discussion
A detailed discussion about application domains, research approaches, and architecture components of each layer, such as Edge, Fog, and Cloud has been presented in this section. Figure 2 shows the findings of this research from the surveyed papers. Finally, this section also briefly introduces the proposed architecture for future work from the observations gained from the reviews.

Application Domains
The agricultural applications domain can be mainly categorised as arable (crop) farming or pastoral (livestock) farming applications. The arable farming applications include crop management [53,54], soil management [55,56], irrigation management [57], weather management [58,59], and greenhouse management [60,61]. Moreover, pastoral or livestock farming includes animal monitoring [62][63][64] such as monitoring diseases and behaviour. However, researchers have categorised these domains from different perspectives. For instance, in 2017 [48], classified monitoring (air monitoring, soil monitoring, water monitoring, plant monitoring, and animal monitoring), control (irrigation control, fertiliser and pesticide control, illumination control, and access control), logistics (production, commerce, transport), and prediction (environmental conditions, production estimation, and crop growth) as main agricultural technological domains.
In 2019, Ref. [43] listed main domains of IoT agriculture applications as precision farming (climate conditions monitoring, soil patterns, pest and crop disease monitoring, irrigation monitoring system, determining the optimal time to plant and harvest, tracking and tracing, farm management system), livestock monitoring (animal health monitoring, heat stress level, physical gesture recognition, rumination, heart rate, GPS based monitoring), greenhouse monitoring (water management, plant monitoring, climate monitoring), and agricultural drones. Moreover, according to Ref. [65]'s view, smart agriculture domains are water management, animal care, crop care, farmer helpline, and farm management.
In 2020, Ref. [44] categorised the most common domains as monitoring, controlling, and tracking. At the same time, the authors identified soil monitoring, irrigation monitoring & controlling, humidity monitoring, temperature monitoring, air monitoring, precision farming, fertilisation monitoring, water monitoring and controlling, disease monitoring, and animal monitoring and tracking as agricultural application types. Ref. [10] identified that the most common applications of IoT solutions for smart farming are chemical control, crop monitoring, disease prevention, irrigation control, soil management, supply chain traceability, and vehicles and machinery control.
Based on the existing categories, it is clear that no one has followed any methods or strategies for the agricultural domain groupings. Therefore, to answer the first research question (RQ1), we decided to categorise according to the principle scope of smart agriculture. The results obtained in the analysis from the selected studies were grouped to identify the main types of Cloud, Fog, and Edge Computing agricultural applications. The identified types are (1)

1.
Animal Management: Animal management or livestock management involves all the activities such as animal health and welfare, feeding, grazing and pastoralism, breeding, and animal husbandry carried out by farmers to raise farm animals. Livestock management plays a crucial role as part of human life. Therefore, the demand for high-quality dairy products increasing day by day and precision livestock is also considering as a significant category in smart agriculture by researchers. For instance, Refs. [62,63] implemented a system for animal behaviour analysis and health monitoring in a dairy farming scenario. In order to monitor animal welfare, the authors of [64] developed an open-source system. Additionally, as part of multi domain systems, Refs. [59,66] have also contributed to animal management.

2.
Crop Management: Crop management includes all activities used to improve the growth, development, and yield of crops. Ref. [53] proposes the use of smart drones to manage crops in terms of (a)identify pests, weeds and diseases which help in optimizing pesticide usage and crop sprays, (b) estimate the crop yield, (c) provide data on soil fertility by detecting nutrient deficiencies, and (d) measure irrigation and control crops by identifying areas where water stress is suspected. The authors in [54] proposed a smart model for the agriculture field to predict the crop yield and decide a better crop sequence. Ref. [67] developed a smart robotic system to improve harvesting and production, and Ref. [68] developed an application to identify realtime pest detection. Moreover, other applications identified [25,58,59,66,[69][70][71] as multi-domain applications.

3.
Greenhouse Management: There were few applications proposed and developed for greenhouse management in terms of the home automation system to control environmental conditions [61], flexible platform able to cope with soilless culture needs in full re-circulation using moderately saline water [60], and a vegetable growing cabinet [72]. In addition, Ref. [73] implemented an agricultural data collection framework and experimented in a greenhouse in order to analyse the proposed methods.
Ref. [74] implemented a wireless agricultural monitoring system for greenhouse.

4.
Irrigation Management: Irrigation is crucial for all activities in both animal and crop farming. Good irrigation scheduling and efficient utilisation of water resources are two main parameters in agricultural systems. Therefore, in order to get the maximum utilisation, Ref. [75] proposed architecture and developed a system for intelligent irrigation monitoring. Similarly, Ref. [76] presented a low-cost solution for automatic Cloud-based irrigation, and Ref. [77] implemented a Cloud and IoT based system for irrigation schedule. Moreover, Ref. [78] implemented a smart irrigation systems. See Table 4 for other multi-domain applications.

5.
Soil Management: Every plant needs certain moisture levels for its optimal growth to be maintained [55]. The soil management refers to all the processes which aim to improve soil performance. In order to achieve this target, the authors of [55] developed a low cost, continuous monitoring of the soil moisture system. In addition, Ref. [56] proposed a model for efficient soil moisture monitoring. Other applications such as [53,57,58,71,[79][80][81] are pointed out as multi domain applications. 6.
Weather Management: The authors of [82] proposed a remote farm monitoring system to monitor temperature, humidity, and soil moisture. In addition, Ref. [83] presented an architecture to monitor environmental data such as wind speed and direction, rain volume, and air temperature and humidity. Ref. [80] proposed a multi-domain system that also covers environmental monitoring parameters like temperature, air humidity, and rainfall. The authors in [84]  proposed a home automation system to monitor temperature and humidity. Finally, Ref. [86] proposed an architecture to monitor temperature, humidity, light intensity, and soil moisture in a coffee farm.  Figure 3 illustrates the number of single and multi-domains research papers published in the agricultural application domains between the year 2015 and the present. It can be seen that crop management has more publications than other domains, where most of them are from the multi-domain category. In terms of single domain applications, greenhouse management has more than multi-domain applications. However, crop, irrigation, soil, and weather management applications are more from multi-domain types. Overall, we can see that most of the agricultural applications are developed not only for a single domain but also combined with other applications.

Research Approaches
The ultimate goal of this section is to find the solution for RQ2. In this section, we discuss the types of research approaches from the analysed research papers in agricultural Cloud, Fog, and Edge Computing applications. They have presented a particular innovation and output under Survey/Review, Architecture, and System/Application. Each of them is pointed out briefly to determine a common concept according to terminology as follows: • Survey/Review: A process of analyzing, summarizing, organizing, and presenting novel conclusions from the results of technical review of recently published scholarly articles. It is mainly a comprehensive review of Cloud, Fog, Edge, and IoT based smart agriculture. • System/Application: It is defined as a software program or group of programs designed for end-users as a solution for a specific problem. • Architecture: It is a general abstract design of an application or system that tries to satisfy the business needs according to requirements, limitations, and technical constraints. It contains the components, functions, and communications. Furthermore, it focuses on how they interact with each other components and with users.
In Table 5, we summarise the identified research approaches. From the analysed recent studies, few papers [35,[91][92][93] were identified under the Survey/Review category. For instance, Ref. [91] reviewed the main trends and challenges in smart climate agriculture. The authors of [92] surveyed the state-of-the-art research utilising the Edge model of computing in agriculture, whereas Ref. [93] studied typical applications of agriculture IoT Sensor monitoring network technologies using Cloud Computing. Ref. [94] reviewed Wearable Internet of Things (WIoT) enabled precision livestock farming in smart farms. The applications and systems about smart agriculture and modern computing paradigms were observed from our survey. The notable applications are Decision Support System (DSS) for potato late blight disease prevention [69], Cloud of Things (CoT)-based automated irrigation system [75], Cloud-based digital farm management system for vegetable production process management and quality traceability [96], Fog assisted application for animal behaviour analysis and health monitoring in dairy farming [62,63], a smart agricultural knowledge support system to provide real-time information [80], smart farm computing systems for animal welfare monitoring [64], and a greenhouse system [61].
Moreover, some studies presented architecture models for the smart agricultural domain. For example, Ref. [86] introduced a Fog-Cloud based architecture approach to provide data collection reliability in Things-based Coffee Smart Farming. Ref. [58] proposed architecture for monitoring and predicting data in precision agriculture. Ref. [97] presented an architecture based on Fog Nodes and LoRa technology to optimize the number of nodes deployed in smart farms. Ref. [83] proposed three-layer architecture that consists of a frontend layer, gateway layer, and back-end layer for farm monitoring. Ref. [56] introduced a Cloud-based architecture for soil moisture monitoring. Ref. [84] proposed an integrated WSN and Cloud architecture for agricultural environment applications such as temperature, humidity, moisture, and pH. Ref. [79] proposed Home Edge Computing architecture (HEC) for smart and sustainable agriculture and breeding. It is worth mentioning that, in all of the proposed and implemented architecture, the bottom layer is always sensors, whereas the top layer is Cloud centre or Cloud server. The middle layer was different based on the author's preferred combination, Edge, Fog, or Edge-Fog.
Finally, it is observed that some authors not only proposed an architecture but also implemented systems as well. More specifically, Ref. [59] proposed architecture of a Cloud-based autonomic information system for agriculture to manage different types of agriculture-related data. The authors also developed a system to get information from IoT devices, analyze them, and store user data in the Cloud. Similarly, Ref. [60] presented three-tier architecture using Cloud, Edge and Cyber-Physical Systems (CPS) planes to manage greenhouse facilities, and Ref. [25] proposed and developed a platform by integrating Cloud with limited network information resources to be integrated and automated, including agricultural monitoring automation, pest management image analysis and monitoring. Ref. [66] implemented an architecture using the Industry 4.0-oriented Edge Computing reference architecture (GECA) and developed an application for monitoring and managing mixed crop-livestock farming. Ref. [85] proposed three-layered Cloud/Fog Computing network architecture and developed a system for monitoring olive groves. Furthermore, Refs. [62,81,84] also proposed an architecture and implemented a system. Table 6 presents a summary in order to answer the research questions (RQ3, RQ4 and RQ5) based on the information extracted from the selected studies. First of all, we have grouped the components of architecture into Edge, Fog, and Cloud layers according to the existing models.

1.
Edge layer: We observed that, in most of the applications, sensors [55,58,61,63,64,67,69,79,81,98], actuators [67,82,85,97], or IoT devices [60] were used as a bottom layer. The most common sensors used in the applications are wearable sensors, environmental sensors such as temperature, humidity, light, soil moisture, pH, and satellite sensors [56]. In particular, Ref. [66] considered barn sensors, agro-meteo station in crops, and cattle sensors as the IoT layer, and the authors of [86] included sensing systems such as temperature, humidity, light intensity, and soil moisture. Ref. [66] used local data store and Edge gateways in the Edge layer. Ref. [73] considered Edge servers in the Edge layer. In some papers, authors used different components in the Edge layer. For instance, Edge Gateways [82], gateway such as WiFi [85], Edge node, communication interfaces, gateway [80], MEC and HEC [79], and NFV nodes [60]. To make an interaction between the Edge layer and Cloud, wireless technologies such as LoRa, Wi-Fi, 3G, or ZigBee can be used.

2.
Fog layer: Ref. [86] proposed Fog hierarchical architecture where authors introduced two Fog layers with the components of Fog controllers in the first layer and Fog nodes as the second. Ref. [85] presented a Fog Computing network as a Fog layer where it contains storage, server, and network attached storage. In some papers, authors used different components in the Fog layer. For instance, Fog gateways [82], Fog nodes [63,97], farm controller [64], Fog node, and gateway [60,80,98]. 3.
Cloud layer: Ref. [66] considered Cloud applications and APIs as a Cloud layer, whereas Ref. [86] presented Data Centers, SaaS, PaaS, and IaaS in the Cloud layer.
Furthermore, different types of wireless technologies are used for communication purposes in each layer. The most common used technologies in the surveyed papers are Zigbee [61,69,81,85], LoRa [69,79,82,97], Bluetooth [69], Near field communication (NFC), Wi-Fi [66], and nRF [82]. For each level layer, different protocols are used by authors. For example, Ref. [82] used nRF wireless to send the data from sensors to Edge nodes. The authors also used LoRa to send the processed and compressed data from edge nodes to fog gateways and used Wi-Fi, Ethernet, or 4G for Fog gateways to Cloud interaction. To make communication between sensors and nearest gateways, some authors used nRF [82,83] wireless communication module. Developed an application to provide real-time pest detection in the orchard. increase crop yield drones -Cloud 2021 [67] Developed an IoT based smart robotic system to improve harvesting and production. low cost, consumes less power sensors, actuators -Cloud (data storage) 2020 [53] Introduction of a Smart Drone for crop management where the real-time drone data coupled with IoT and Cloud Computing.
promote resource sharing, cost-saving and data storage sensors -Cloud (Server, Storage)

Proposed Architecture
Based on the observations gained through the reviews, a Cloud-Fog-Edge Computing model proposed for smart farming is illustrated in Figure 4. The Cloud layer is mainly for ample scale data storage and data analytics. This layer is also responsible for loading algorithms and data analytical tools to Fog nodes. This can also be used to store backup data for future analysis. The Fog layer is essential in this model, and this will be installed in local farms. Fog layers will be responsible for real-time data analytics such as predicting pests and diseases, yield prediction, weather prediction, and agricultural monitoring automation. Moreover, this will make decisions on real-time data and do reasoning analysis as well. Finally, the processed and analysed data can be uploaded to the Cloud layer for backup purposes or further analysis. The third layer is the Edge, consisting of end devices, tractors, sensors, and actuators. The main goal of this layer is the collection of data and its transfer to the Fog layer.

Challenges and Future Directions
Although Cloud, Fog, and Edge-based technologies within the agricultural sector present several advantages, it has some notable challenges as well. This section discusses the challenges and future directions in agricultural-based Cloud, Fog, and Edge-based computing which aims to answer RQ6. Security and privacy [35,91,[99][100][101][102] require mobility support and widespread geographical distribution through an extended number of nodes [91], constant and high speed network connectivity [91], strong need of real-time data processing [35,91,103,104], better power management [35,103,105], high hardware costs [35,104,106], and poor internet connectivity in farms [7,100,107] are few challenges. The following clearly describe the challenges and possible solutions for them.

1.
Security and privacy [35,91,[99][100][101][102]: When agricultural applications deal with Cloud computing, data security and privacy, authorisation and trust, authentication and secure communication, and compliance and regulations are the significant challenges [108]. This is because, in smart farms, an enormous amount of data are generated from various kinds of data resources such as sensors, actuators, and Edge devices. Therefore, for the data stored in the Cloud, there is a chance of leakage. This might cause severe economic loss for farmers and agricultural industries. However, to overcome this issue, applications must include more computational capabilities, such as edge computing, handling massive data, artificial intelligence resources, and security features, with the combination of Cloud [101].

2.
Requirement of mobility support [91]: Smart farms require mobility support and real-time data processing since it continuously collects more data from the field. If the farms are only connected with Cloud, these features are not possible. However, the characteristics of Fog make it possible to do real-time data collection and processing at the farm. Additionally, for real-time data processing, a consistently high speed is essential. To solve this issue, the combinations of Fog and Edge are recommended because these two have characteristics such as low latency, high bandwidth, and high mobility [91].

3.
Data processing [35,91,103,104]: Data processing and decision-making are crucial features in smart agriculture. If smart farms only depend on Cloud to analyse and produce the results, it will not be a good solution in terms of real-time data. In this case, the combination of Edge-Cloud or Fog-Cloud would be an excellent solution.

4.
Better power management [35,103,105,109]: Smart farms are not possible without sensors, actuators, and mobile devices. All of these devices depend on power to collect data and send it to other layers or processing in the edge node. Efficient energy and power management strategies enhance the lifetime of batteries [110][111][112]. As an alternative, renewable energy sources such as solar power can also be used for the longer life of sensor nodes [103,109,113].

5.
High hardware costs [35,104,106]: As sensors and other Edge devices continuously collect data and send it to the Cloud in Cloud-based agricultural applications, the process of uploading and analysing data will consume not only hardware resources but also a lot of network resources and Cloud resources. Additionally, it also includes the deployment of IoT in smart farms. Efficient cost management is highly needed to manage hardware cost issues in smart agriculture. 6.
Poor internet connectivity [7,100,107]: This is one of the most common issues in smart farms, especially in rural areas. Internet connectivity is the essential thing to be a smart farm. However, poor internet connectivity in farms causes some issues such as data loss, processing delay, slow data upload speed, and slow response. Moreover, these problems will happen if the smart farm is only connected with Cloud. However, Fog Computing provides the facility to solve these issues since it has its own local server and data centre. Therefore, local data processing is possible as it has offline services as well.
All the above identified challenges are mainly from Cloud based applications. The combinations of computing and Fog based applications can solve most of the problems as we discussed above. From Table 6, we can observe that the combinations of modern paradigms in the agricultural based applications proved the high possibility to solve the common problems of Cloud such as latency [59,79,80,97], bandwidth [59,97], and network traffic issues [66,98]. It is also proved that most of the applications are low-cost applications. Moreover, it is worth mentioning that Fog Computing can solve some major problems such as real-time data processing with low latency and high bandwidth, unnecessary cost, and data security and privacy. However, further research needs to be done to find out how to overcome these issues.

Conclusions
Fog and Edge Computing are emerging paradigms compared to the Cloud. In recent years, researchers focused more on combinations of these new paradigms to build systems, including the agricultural domain. In this study, we have presented an updated systematic literature review on the role of modern computing paradigms, namely Cloud, Fog, and Edge Computing in Smart agriculture domains in terms of application domains, research approaches, and existing applications with the combination. Based on an analysis of the literature, the agricultural application domains were identified as six categories: animal management, crop management, greenhouse management, irrigation management, soil management, and weather management. This work also discussed the identified benefits and objectives of the surveyed smart agricultural applications (i.e., low latency, low cost, saving bandwidth, and reducing data traffic). Additionally, it reported the methodology and intermediate results obtained during the stages of identification, screening, and results in great detail. From 2788 initial studies extracted from electronic sources, 55 primary studies were selected based on their relevance to answering research questions.
Furthermore, it was observed in this review that, in recent works, most of the research on smart agricultural applications is mainly focused on Cloud-based and sensors. Few scholars have applied combinations of Cloud, Fog, and Edge in the agricultural domain. It also found that most applications relied heavily on Cloud, and few applications started to apply the combinations of computing paradigms such as Cloud-Edge and Cloud-Fog. This review also recognized few challenges in existing smart agriculture based applications such as security and privacy, the requirement of mobility support, data processing, better power management, high hardware costs, and poor internet connectivity. It is also reasonable to assume that future solutions will need to highly focus on applying the combinations in order to get the benefits of a truly connected and smart farming concept. In the next step, we will focus on implementing the proposed architecture model with the combinations of all three computing for smart farms in order to get maximum benefits of each paradigm. According to the GSM Association, the number of devices is expected to increase in the following years. Therefore, we firmly believe that combining this architectural implementation will bring more advantages and new opportunities in the smart agricultural domain.

Institutional Review Board Statement: Not applicable.
Informed Consent Statement: Not applicable.

Data Availability Statement:
No new data were created or analyzed in this study. Data sharing is not applicable to this article.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: