Smart Sensing with Edge Computing in Precision Agriculture for Soil Assessment and Heavy Metal Monitoring: A Review

: With the implementation of the Internet of Things, the agricultural domain has become data-driven, allowing for well-timed and cost-effective farm management while remaining environmentally sustainable. Thus, the incorporation of Internet of Things in the agricultural domain is the need of the hour for developing countries whose gross domestic product primarily depends on the farming sector. It is worth highlighting that developing nations lack the infrastructure for precision agriculture; therefore, it has become necessary to come up with a methodological paradigm which can accommodate a complete model to connect ground sensors to the compute nodes in a cost-effective way by keeping the data processing limitations and constraints in consideration. In this regard, this review puts forward an overview of the state-of-the-art technologies deployed in precision agriculture for soil assessment and pollutant monitoring with respect to heavy metal in agricultural soil using various sensors. Secondly, this manuscript illustrates the processing of data generated from the sensors. In this regard, an optimized method of data processing derived from cloud computing has been shown, which is called edge computing. In addition to this, a new model of high-performance-based edge computing is also shown for efﬁcient ofﬂoading of data with smooth workﬂow optimization. In a nutshell, this manuscript aims to open a new corridor for the farming sector in developing nations by tackling challenges and providing substantial consideration.


Introduction
The agricultural sector in developing countries has multiple challenges, i.e., if we look at the production side, the first challenge which the farmer faces is the productivity challenge, as it becomes evident that developing countries are very low in productivity, i.e., for any crop, the particular developing country could be the highest producer but at the same time its productivity could be very low. Therefore, crop productivity is a significant factor which has to be looked at. The second challenge which the farmer faces is with respect to climate change, industrial pollution, and pest attacks, as they can damage crops substantially. It is deemed necessary for the farmer to mitigate those challenges by adapting to the latest technologies and insurance schemes. The third challenge is related to market connectivity, whereby the farmer produces crops and thus needs to be connected to distant markets as per the crop production analysis and its subsequent data insights. It is essential for the farmers to have all the information on a digital platform and there should be seamless trade between different markets and different places. However, this connection between farmers and the distant market is nowhere to be seen in developing countries. On the other hand, the industry is looking up for exports, which in turn need to be streamlined substantially. From the economic perspective of the developing country, it is a boon if more facility in nature and regulatory support has to be given for people who are looking to export outside their country or who are looking to have a value-added product across the globe. Now, this mismanagement in the agricultural sector can potentially lead to food security risk.
Precision Agriculture (PA) is intended to help and maximize the development of the farming sector and will also help to ensure food security [1]. It is to be highlighted that PA is a high-tech farming technology that observes, measures, and analyzes farming fields and crops. With the advent of PA, on-field sensors can provide detailed levels of data for problems of soil and weather conditions pertaining to heavy metal toxics and climate change. Big data obtained from sensor networks and farm inputs tracking have a significant role to play to increase farm productivity, reduce environmental impacts, and improve human welfare [2]. By combining artificial intelligence-based big data analytics with sensor and image data, an integrated system could be developed for the agricultural domain. Implementing intensive, high-value, personalized management of crops would increase both production and economic performance. The aim of this paper is to highlight the importance of smart sensors and high-performance computing in protecting stakeholders in the agrifood value chain and providing them with unlimited access to a large dataset of various categories in order to track their farms. The challenges and consideration for the farming sector in developing countries are also highlighted. Figure 1 shows the number of articles reviewed in various domains in the proposed manuscript. The structure of the paper is arranged as follows: The first section of the paper explains the paper's scope and the reasoning for the proposed study. Section 2 gives an overview of food security by taking into consideration the pollution caused by persistent toxics and heavy metal. In addition to this, Section 2 also highlights the importance of smart farming based on IoT. Section 3 gives a detailed overview of the wireless communication protocols and sensors used in the agricultural domain. Furthermore, Section 3 also emphasizes the importance of edge computing and also highlights the model of High Performance Computing (HPC) on Edge. In addition, Section 3 also details the various edge computing methodologies used by previous researchers in precision agriculture. Section 4 highlights the current challenges and considerations for the agricultural sector in developing countries. Finally, Section 5 presents the conclusion of the proposed review.

Food Security: A Global Challenge in View of Soil Pollutants and Heavy Metal Toxicants
Over the next 35 years, the world's growing population will demand more food than mankind has ever produced. However, food security faces a variety of issues on both the development and consumption sides, which would necessitate further study in order to formulate a solution. The food system, on its current course, would likely absorb much of the remaining carbon budget if the temperature rises by 2 • C by the year 2050 [3]. As a result, it would leave no room for other industries, making reaching the Paris Agreement virtually impossible. Due to severe weather conditions, climate change of this magnitude would alter what can be grown and worn, as well as the dynamics of pest and disease spread. Food production shocks will occur, eventually leading to higher food prices and civil unrest. Agriculture is important, but it consumes 70% of all freshwater, resulting in one-third of all greenhouse gas emissions and the loss of biodiversity and soil depletion [4,5]. Finding new ways to sustainably produce more food on available land will be crucial as agricultural land becomes scarce. This necessitates substantial assessment of agricultural soil monitoring and mitigating the heavy metal pollutants and other toxics from the soil.
Heavy metal contamination is widely spread across the world, disrupting the atmosphere and thereby showing significant threats to human health. The reason behind heavy metal contamination, in general, is the rapid speed of urbanization along with industrialization and noticeable land use change in fast-moving developing nations such as China and India. Post-Industrial Revolution and economic globalization, there has been an unprecedented rise in the variety of environmental pollutants, with innumerable anthropogenic sources. Therefore, this continuously evolving issue pertaining to food security has become a serious concern for the world, specifically its inextricable relation to the health of human beings [6,7].
Several dangerous heavy metals and metalloids comprising arsenic, cadmium, lead, and mercury are categorized as non-essential for metabolism. These metals are considered to be deleterious in different ways [8,9] and have thus been listed in the top 20 list of hazardous substances by the United States Environmental Protection Agency and the Radioactive Substances and Disease Registry Agency (ATSDR) [9,10]. With respect to metabolic process, heavy metals, like Fe, Zn, Cr (III), and Cu are considered to be essential components along with enzymes and cytochromes, which are inextricably connected to the biota metabolic functioning [9,11]. With regard to urease, nickel is considered to be an important component; however, it may pose an unnecessary risk to human health [12,13]. Therefore, with respect to the above context, soil-food crops and vegetation ecosystem is a well-laid-out example of abiotic-biotic interactions.
Heavy metal pollution generated from energy intensive industries poses a serious threat to the sustenance of soil. Apart from the ill effects on human health, heavy metal also puts an adverse impact on soil biota through soil microbe interaction and microbial processes [9,14,15]. It also hampers the ecosystem when it comes to beneficial soil insects [16][17][18]. It is worth noting that medicinal plants can be used for bioaccumulation of heavy metals. A prominent example of such a case is the "Paeonia Ostii" Chinese medicinal plant [19]. Numerous medicinal plants are demonstrated to bioaccumulate various heavy metals, i.e., As, Cd, Fe, Pb, Cr, and Cu when grown near industrial zones [9,[20][21][22][23]. It is also essential to note that, even in the greenhouse ecosystem, vegetation is susceptible to heavy metal such as Zn, Pb, Mn, Cu, and Cd due to decreased exposure to illumination [24].
For a successful technological remedy, it is essential to understand the soil-food crop transfer mechanisms. In order to achieve this purpose, this analysis first discusses the different causes of heavy metal contamination in the soil ecosystem and its relevance to the health of human beings. In general, this type of analysis gives an overall layout pertaining to heavy metal sources within the agricultural domain which in turn is correlated to anthropogenic influences. It also helps us to provide state-of-the-art information regarding the global scenario of heavy metal pollution spanning across different continents in the agricultural domain. In this regard, the next subsection elaborates on the heavy metal sources in the soil-crop ecosystem.

Heavy Metal Sources in Soil-Crop Ecosystems
It is evident from numerous studies that the source of heavy metals in the agricultural ecosystem is due to industrial pollution, sewage sludge, phosphate-based fertilizers, metal pesticides, and contaminated water [9,[25][26][27][28][29]. In addition to the mentioned sources of heavy metal pollution, it is also essential to understand the impact of anthropogenic pollutants, as they pose a risk to the health of human beings through dietary intake of contaminated food crops which become polluted either through soil or direct atmospheric deposition over the surface of plant leaves [17,30]. Waste effluents discharged from industries and automobiles accumulate in soil, thereby causing contamination in the food chains [9,31,32]. It is also worth noting that coal-based power plants pose a significant threat with respect to Hg soil pollution. In this regard, Li et al. [24,33] stated the adverse effect on human health caused by consuming lettuce and water spinach grown in Hg-contaminated soil area. Likewise, many strong sources present a grim outlook for global food safety. Figure 2 shows the ecosystem of heavy metal contamination. Heavy metals emitted from automobile and industrial smelters are transported to distant locations, i.e., up to several kilometers away from their sources by wet or dry deposition [34]. These metals accumulate in plant leaves through foliar transmission after the deposition of atmospheric particles above the surface of the leaf [34]. Fernandez and Eichert [35] proposed that particles can penetrate the leaf tissue through the pores present on the leaf cuticle and inside stomata. Similar to root uptake, foliar uptake of heavy metals may also arise in a dose-dependent manner. Nonetheless, one of the leading contributors of heavy metal penetration in agricultural soil also comes from sewage and sludge pollution. To address the concern of rising wastewater produced from domestic and industrial processes as a result of the growing human population, a reliable strategy and stable treatment systems are urgently needed. With the rapid growth of agriculture in the past decade, overuse of water resources, especially for agriculture, has become a problematic issue which threatens to intensify the effects of climate change. Agriculture constitutes by far the largest use of water in all countries [36]. In order to solve this problem, it has been found that wastewater reuse is a feasible option to minimize anthropogenic impact [37].
Furthermore, raw wastewater reuse in agriculture is a valuable tool for developing countries to minimize usage of freshwater while also addressing the challenge of rising food production in water-scarce areas. The benefits of reusing water in agriculture are numerous and unquestionable, i.e., it saves significant quantities of freshwater which may be assigned for other essential purposes; it provides nutrients that may replace chemical fertilizers, thus helping to increase soil fertility and crop yield and reduce production costs; it allows for the expansion of agricultural land in dry areas; it is a relatively cheap disposal method for raw wastewater; and it can help to prevent contamination of surface water. In addition, it has been demonstrated that the health risks associated with raw wastewater usage in agriculture are satisfactory if its biological content meets specified standards [38,39].
Having elaborated on the positive side of raw wastewater, there are also possible negative effects, such as soil salinization and groundwater contamination of metals and organic compounds. It should be noted that these are only theoretical at this point. Furthermore, the use of untreated water for agricultural production is potentially dangerous due to its microbial substance, especially bacteria, viruses, and parasites, which can cause a number of diseases because many of them can be sustained for longer periods in the environment. This in turn tends to affect the quality of the soil.
It is crucial that farmers aim to keep the quality of their soil high in order to preserve the health of their soil species. Soil microbes are an important component of the ecosystem [40]. Soil fertility depends in part on the breakdown of organic matter and the flow of nutrients through the ecosystem. When they are subjected to stresses like extreme temperature, pH, salinity, and chemical pollution, they are able to negatively affect productivity [41][42][43]. Owing to the variety of anthropogenic activities, soil may become polluted with a variety of heavy metals from manufacturing and mining. Many forms of contaminants, i.e., from mine waste, sewage sludge, chemical fertilizer, and pesticides can end up in the soil system and adversely affect soil microbes [43]. As another alternative, vegetables produced in greenhouses also become polluted by heavy metals, often from anthropogenic sources. Within the source, detection of heavy metals can be performed using sophisticated statistical and geospatial methods [9,[44][45][46][47]. Greenhouse vegetables in China were more susceptible to Cd pollution than crops in open farmland [48,49]. The results of the Principal Component Analysis (PCA) demonstrated that As, Ni, and Cr are primarily discharged from weathered rocks, while metallic pollutants such as Hg and Pb are generated by industry, vehicle fumes, and reuse of wastewater for irrigation [48,49]. Nonetheless, it is worth noting that PCA has been used by several researchers in various agricultural domains for the assessment of soil heavy metal pollutants [50][51][52][53].
Identifying soil pollutants and their origins is important to research due to their close ties to human health [54][55][56]. In this regard, it has become deemed necessary to come up with tools and techniques which can monitor heavy metal composition in the soil which can be incorporated into the smart farming ecosystem. Smart farming is considered to be the next key segment in the agriculture sector as it has changed the methodological paradigm of how farmers operate on fields. The following subsection highlights the overview of smart farming and its benefits.

Smart Farming Initiatives Is the Need of the Hour
With the advent of Internet of Things (IoT), smart devices have reached into all facets of our day-to-day life, i.e., healthcare and wellness, smart homes, automobile and logistics, intelligent cities and industries. In recent decades, agriculture has seen a series of technological changes, increasingly industrialized and technologically driven. Through different agriculture-based smart devices, farmers today now have greater control over animal husbandry and cultivation processes, making them more predictable and productive. This, along with the rising market demand for agricultural products, has helped to increase the worldwide proliferation of intelligent agriculture technologies. It is worth noting that for the year 2020, IoT's agricultural market share reached $5.6 billion [57].
Modern agriculture can be addressed in several respects. For instance, AgriTech refers to the use of technology in the domain of agriculture [58]. In addition, intelligent agriculture is primarily used to describe the use of IoT-based agricultural solutions. With IoT sensors, farmers can make informed decisions and develop various parameters of their work, i.e., cattle to crop production, in order to collect environmental and machine metrics. For example, farmers can decide exactly how much pesticide and fertilizer is to be utilized to optimize productivity by using smart agriculture sensors for monitoring crop status. The same applies to the concept of intelligent farming. Figure 3 shows a broader perspective on a modern-day agricultural model, which incorporates various wireless sensor nodes to enable IoT-based farming with satellite communication, where different ground sensors are deployed which communicate with the cloud computing node for data processing and analysis, so that farmers can make correct decisions. Although smart IoT and industrial IoT are not as common as consumer-connected devices, the market continues to be very competitive. IoT technologies are increasingly being implemented for agriculture. COVID-19 has had a positive impact on IoT market share in agriculture. Indeed, the smart framing market share is expected to hit $6.2 billion by the end of 2021, as reported recently [57].
It is evident that COVID-19 has made a significant impact on the farming sector across the world. However, the agricultural sector is showing potential to make a strong comeback by leveraging positive government policies which indicate adoption of advanced technologies by making substantial investment in the agricultural sector. This initiative will make room for IoT-based agricultural solutions as a prominent business strategy, thus causing a reasonable increment in crop production. However, in the current situation, the market is expected to show a decline up to 0.8% for the first two quarters of year 2021 compared to 2020 and this trend will show a positive growth from 2022 onwards [59].
In addition to this, the smart world agriculture market is projected to triple to 15.3 billion dollars by 2025, compared to just over 5 billion dollars back in 2016 [60]. If the sector continues to expand, there will still be plenty of opportunities for companies. In the coming years, creating IoT products for agriculture will distinguish companies as early adopters, thus helping to pave the way for success.
Today, the innovations on our immediate horizon include autonomous machines which have the capacity to pluck and pick fruits and vegetables from the respective plantation. A highly sophisticated sensing system includes microscopic sensors and cameras that help farmers track the growth of crops and warn them when something is wrong or inform them of the optimum time to harvest. The Bonirob developed by Deepfield Labs [61] can take a soil sample, liquidize it, and then analyze its pH and phosphorus levels in real time. Researchers expect to grow and harvest an entire hectare of land barley without humans ever entering the field as a proof of concept for autonomous farming technology. Companies like Aerobotics [62] already have commercialized software that analyzes infrared photos taken by drones to detect unhealthy vegetation, similar to a real-life game of SIM farming in which the farmer receives a warning on their computer when a disturbed area is detected. Machine learning is constantly improving the system's ability to distinguish between crop varieties and weeds that pose a threat to the farmer. Furthermore, various pilots are hired by Micro Aerial Vehicle (MAV)-based companies to fly light aircraft equipped with multispectral cameras on data-gathering missions over vast farms around the country [63]. Planet Labs has a fleet of CubSat satellites that take weekly photographs of entire farms from space to aid in crop monitoring [64]. To cope with this new wave of data, other companies are developing analytics tools to act as farm management systems, enabling farmers to work on a variety of land sizes. Farmers' business networks can now integrate data from several farms into one large pool, giving their members access to macro-level insights that were previously only accessible to corporate mega farms.

Benefits of Smart Farming
In certain ways, technology and IoT have the ability to change agriculture. There are five ways in which IoT can boost agriculture: Loads of data gathered by sensors from the fields, i.e., temperature, soil quality, crop growth progress, and animal health can be used to monitor the condition of the farm along with the performance of field workers and efficiency of equipment. • Improved internal process management and therefore lower output risks: • The ability to forecast the production performance enables farmers to become prepared for a better delivery of goods. Wise decisions can be made if the estimated production of the crop is known.

•
Cost savings and waste reduction by improved quality control: • If any irregularities in crop growth and animal health are seen, then the risk of losing the yield can be minimized. • Improved business productivity through process automation: • Smart farming can automate several processes during the development cycle, i.e., irrigation, fertilization, or pest control with intelligent devices. • Improved consistency and volume of the commodity: • Greater control over production processes and retaining higher crop quality levels and growth potential by automation can be achieved. • Helps to mitigate soil toxicity and monitor significant parameters, thereby providing sustainable agriculture: With the advent of low-cost sensors for monitoring agriculture, significant parameters in the agricultural ecosystem can be analyzed to increase the factor of sustainability, i.e., assessing soil quality and monitoring soil toxicity, water quality and its controlled usage, weather conditions, and optimized usage of fertilizers.
All the aforementioned variables will contribute to higher revenues. However, the benefits of smart farming can only be exploited if the quality of internet is able to accommodate the IoT infrastructure. In this regard, the following section discusses internet access quality in developing countries.

Quality of Internet Access in Developing Countries
IoT provides an environment in which objects, animals, or humans have uniquely identified data that can be communicated over the internet without the need for computer interactions between humans and computer [65]. In 2015, over 13.4 billion devices were linked to the internet (as part of IoT) and it is forecasted that by the year 2020 there will be a rise in 18.5% to 38.5 billion devices, according to Juniper research (Juniper research 2015) [66]. Today, nearly every field of modern society is being overtaken by IoT [67]. The main areas include smart health, smart cities, intelligent industries, driverless cars, smart agriculture, precision farming, smart homes, etc. [68]. In this regard, it has been deemed necessary for every household and business sector to become connected with the internet, if we want to realize the maximum utilization of IoT. Figure 4a shows the graph of internet users worldwide on the basis of geographic division and Figure 4b shows the subsequent penetration rate till October 2020 [69]. It is worth noting that, although the number of users in Asia and Africa is high as observed in Figure 4a, if Figure 4b is analyzed, then it becomes evident that there is a clear-cut digital division, as the penetration rate in Asia and Africa is a mere 59.5% and 47.1%. In most of the developing and underdeveloped countries in Asia and Africa, the agricultural sector plays a prominent role in the contribution of overall Gross Domestic Product (GDP). Therefore, reforms in communication technology are deemed necessary in such regions to incorporate the IoT paradigm into the agricultural domain. IoT has great potential and is one of the main areas for future internet services growth. IoT problems are exploratory in major IT companies and most countries. New uses of IoT are being searched for and developed, but most work has been done in the field of standardization of solutions [70]. IoT issues are included in the European Digital Agenda (2016) [66]. As part of the European framework for research and innovation HORIZON 2020, more than EUR 140 billion is estimated to have been invested in IoT technology between 2016 and 2017 alone (European Commission, 2015). In March 2015, the EU Commission launched the Innovation Internet Alliance. The objective of the alliance was to develop close cooperation on innovation and standardization of IoT (European Commission 2016) between the EU Commission, stakeholders, and parties involved in IoT [66].
The fragmented existence of platforms and communications protocols is one of the major problems of the present day, and contributes to incompatibility problems between different IoT devices and features [71,72]. IoT is well known in precision agriculture, but only proprietary solutions that lead to compatibility and connectivity issues between various equipment are being used [73]. New technologies need to be sought, based on open standards and frameworks that are compatible with smartphones. Many products that are based on open hardware at least partially are currently on the market and prices are considerably lower than proprietary solutions. Therefore, by keeping the current infrastructure in consideration, the agriculture methodological paradigm can be taken to the next level by connecting to the IoT.

Embarking Agriculture on IoT
Farmers today have to face the biggest challenges in crop production as global population grows. Therefore, it has been deemed necessary for the farming sector to bring major shifts in adapting the latest technologies. IoT is driving change in agriculture, which has brought a shift in the farming paradigm. IoT refers to devices or objects embedded in the sensor for the purpose of measurement and transfer of datasets through network devices, from pumps and tractors to weather stations. In essence, IoT means that these physical machines can transmit and receive information from farms on devices using the internet in order to remotely measure all types of data and provide that information to the farmer. Soil moisture, chemical properties, dam levels, livestock health, and weather details can be collected in real time by IoT devices. IoT devices information helps farmers to track farms and accordingly helps to advise farmers to increase productivity and yields. Farmers can also respond faster to farm conditions and save time and money. Nonetheless, with the advent of IoT, there lies a major challenge in the processing of high volumes of data generated from the on-field sensors. Therefore, researchers need to tackle this issue by coming up with cloud computing models synchronized with on-field agricultural sensors.

Data Processing Challenge in IoT
One of the biggest hurdles of IoT is to process large datasets in tandem. However, knowing what the data are, what the nature of the data is, and how they go through are some of the key components that need to be looked upon in this process. Gathering the data forms the initial stage, and the other factor comprises ingestion of data to the system from the sensor. It is deemed necessary to understand that the data go through all the gateways before entering into the system where the data are actually cleansed and transformed, which eventually leads to substantial insights. The big question lies with how many specific points of computation should exist. Let us consider an instance, whereby there is a drip irrigation system which finds that one of the plants is not getting enough water. Now, this delay could not be disturbing for the system as the concerned person handling the drip irrigation system can come back the next morning and actually provide some water or maybe some other time it can be dealt with. However, in order to bring sustenance in the agricultural industry, it is necessary for the farmers to understand the factors that govern crop growth by optimizing the usage of fertilizers and water. In these kinds of situations, decisions are taken close to the actions or where the data originate from. Therefore, in this regard, one can realistically conduct some processing for something to be analyzed and thus, one can recognize some patterns and do some planning for the long term, accordingly. This gives a vision at a spectrum on a scale of time as to where the processing needs to happen. So, by considering all these scenarios, it becomes evident that not all the data are important, and this is the challenging aspect to comprehend. This gives an insight of what data need to be stored, what need to be discarded, what need to be retained for short-term purposes, and what need to be retained for long-term purposes. Thus, all these are challenging issues that need to be addressed and that is where storage technologies are actually highlighted. There are a number of systems that are actually being worked upon; however, due to the lack of quality internet access infrastructure in developing countries, the feasibility of their implementation remains a challenge. One of the viable solutions to solve this problem could be via edge computing whereby the essential data could be offloaded from the cloud over the edge of the cloud, and this is where the paradigm of smart sensing with edge computing comes in.

IoT-Based Smart Sensing with Edge Computing
Numerous embedded programmable devices have been utilized in recent literature. Some are personalized while others are industrial programmable boards or full sensing/monitoring systems in closed-source applications. Researchers select their equipment according to the goals of each study or the main objective. Business pertaining to sensing services includes a range of features outside the box to allow scientists to concentrate on other aspects of IoT de-planting, such as meta-processing, smart tracking and monitoring algorithms, cloud interoperability, and more [74][75][76]. On the other hand, the programmable open approach gives designers versatility in monitoring the actions of the nodes and network and in programming new peripheral devices, such as new sensors or drive modules [77,78]. The next subsections discuss various communication paradigms and wireless sensors and nodes which are suitable to be used in the agricultural domain.

Communication in IoT
Despite significant changes, IoT still evolves, as can be seen from many reviews, to achieve its final form [79]. The configuration of IoT is based on three layers: a network layer (data transfer), a perception layer, and an application layer for data storage and manipulation [80]. The network layer is considered to be the physical layer of the architecture, where the on-field sensors and actuators directly interact with the environment and gather data as per the requirement. Technology such as Wireless Sensor Network (WSN), Radio Frequency Identification (RFID), and recently, Near Field Communications (NFC) are used on the perception layer [79]. Correlation exists between WSN and RFID technology due to semi-passive and active RFID tags which can also be viewed as lowercomputing and storage wireless nodes [81]. A wireless sensing node normally consists of more than one sensor module (either external or embedded along with digital sensor devices), a processing module, typically a low-power microcontroller unit, and a Radio Frequency (RF) communication module compatible with low-power wireless communication technology [82].
At the network layer of the IoT, WSN communicates with physical objects and their surroundings, neighboring nodes, or gateways. The network layer is also responsible for building a network paradigm, by using which the data are typically forwarded to a remote storage infrastructure for further analysis and processing [83]. Wireless standards which are used to develop communication protocols, i.e., 802.15.4, bridge the difference among the internet-enabled gateways and the end-nodes. These types of protocols comprise Sigfox, ZigBee, 6LowPan, WirelessHART, and ISA100.11a. [74,84]. In addition to this, Bluetooth Low Energy (BLE), Long-Range and Long-Range Wide Area Network (LoRa/LoRaWAN), and low-power WiFi have also been used in the network layer.
The application layer is the IoT's third layer. This layer is responsible for getting data downloaded and delivering application-specific service to the users' device via an application programming interface. It is very important, and it promotes the realization of IoT in several respects. The application layer faces a variety of unresolved suits, such as system recognition as a unique device. Identifying and addressing billions of devices around the world would provide them across the future internet with direct internet-like access and power. Identity uniqueness, durability, and scalability are essential characteristics of the approach scheme [83]. IPv6 can mitigate some system recognition problems with its aspects of internet mobility and is expected to play a key role in this sector [85]. The heterogeneity of the wireless nodes, diversity in data types, parallel operations, and integration of data from devices further exacerbate the problem [86].
While numerous theoretical parameters of the WSN have been studied extensively in literature, practical IoT/WSN implementations are very demanding for agriculture and remain a difficult task. Sensor modules must be sufficiently reliable, with the required measuring range available which is protected from environmental factors that either produce false readings or cause malfunctions in the system. As the IoT possesses distributed nature, therefore replacing the power source can be a very tough challenge for battery-operated nodes in open fields or other agricultural facilities. Consequently, very stringent power limitations influence the hardware selection and the low-power characteristics of the chosen peripherals are often taken into consideration when designing a new device. The software components to be implemented must be carefully inspected to incorporate the functionality of a system. The final function code includes a fully integrated understanding of software engineering and adequate testing to prevent field failures [87]. Other characteristics that allow an integrated, low-power system to be chosen for use are its longer-term reliability, the number of digital and analogue inputs/outputs that reduce the number of peripheral devices (sensors and actuators) to be supported, the capacity of power harvesting modules, and the effort needed to program the system.
IoT is a dominant type of IT wireless technology in the seven major groups, i.e., the Global System for Mobile Communication (GSM), Wireless Personal Area Network (WPAN), the Cognitive Radio/Wireless Regional Area Network (WRAN), Wireless Radio, mesh, Point-to-Point (P2P), and the Low-Power Network (LPN), Low-Power Wide Area Network (LPWAN). Further GSM standard is divided into GSM EDGE Radio Access Network (GERAN) and Universal Mobile Telecommunication System (UMTS) and Universal Terrestrial Radio Access Network (UTRAN) [88]. Many wireless devices are produced in compliance with different wireless standards. One prominent problem is the interference between devices that run on the same band (for example Bluetooth, ZigBee, and WiFi) or adjacent bands [89]. Table 1 summarizes the IoT wireless networking which offers a wide range of bandwidth, operating frequency, range, and power consumption. The various technologies and specifications as well as the discrepancies between IoT projects and their unique criteria impede network interoperability. Two very common phenomena are high temperatures and high humidity when it comes to agricultural deployments. Based on observations by Bannister et al. [90], when the temperature increases from 25 • C to 65 • C, it has a major effect on the signal intensity obtained. Boano et al. [91] presented similar findings. In addition, humidity in agricultural deployments can also be very high. For open fields, the wireless nodes are exposed directly to rain or irrigation systems. Relative humidity in greenhouses can also reach 80% for long periods. Dampness has been shown to greatly impact the distribution of radio waves [74,92]. It is necessary to take the specs of the number of nodes into account, i.e., the distance between them, the antenna height, and the operating frequency based on the appropriate size of the messages when selecting a wireless transceiver for the agricultural purpose. The next subsection discusses the sensors which are used or have the potential to be deployed over agricultural fields for soil assessment and monitoring soil pollutants such as heavy metal toxics. In addition, the next subsection also highlights the various wireless nodes and the associated microcontroller and transceiver.

Commonly Used Sensors for Smart Farming and Heavy Metal Identification
Sensors for Soil Moisture (SM) have been used in crop fields for decades to measure water content. The use of handheld/manual soil moisture technology is increasingly being replaced by automated technologies, since there were difficulties in manual soil moisture readings in remote production areas. In the past decade, technology has been developed for wireless data collection, providing managers and users with real-time access to soil moisture data, resulting in more successful water management decisions. Some of the prominent sensing devices to measure soil moisture comprise gravimetric sampling, resistive sensors, capacitive sensors, and Ground Penetrating Radar (GPR) [93]. Gravimetric sampling is a direct and normal SM measurement tool [94]. SM is determined by a proportion of dry soil mass to wet soil mass including pores. It needs the manual drying of soil samples taken from the field and oven sampling [94]. The electrical conductivity of water and the measuring of resistance changes based on soil water content are primarily resistive sensors, such as granular matrix sensors. This method includes sensor calibration for precise SM reading.
Intelligent irrigation-based measurement to maintain soil moisture levels is significant to improve plant productivity and quality. On the other hand, soil moisture sensors these days are expensive, i.e., the ECHO-EC5 soil moisture sensor costs around USD 169 [95]. In order to overcome the cost constraint factor, Wang et al. [95] proposed an RFID-based GreenTag sensor to maintain and improvise plant productivity and quality.
In addition, RFID sensors can be combined with biosensors comprising aptamer and DNA-based properties which can be used to detect heavy metals at nanoscale and large scale levels pertaining to food safety monitoring. A heavy metal detection-based biosensor is composed of genetically modified bacterial cells and a green fluorescent signal amplifier which detects the presence of arsenite in foods [96,97]. Its arsenic detection lasts for an hour with a detection range of 5-140 µg/L. Other methodologies pertaining to biosensors, i.e., aptamers and graphene electrodes, have also been used to detect arsenic with the possibility of being developed as simple and easy-to-use low-cost devices [97,98].
The EC-5 series sensors were also used by Wu et al. [99] for field-specific calibration and evaluation in sandy soils. Nonetheless, EC-5 sensors have turned out to be helpful to reveal soil water content dynamics in different soil depths post rainfall conditions. The ECHO series has other variants of sensors; i.e., ECHO-EA10 can be used for medium textured soil type with low electrical conductance conditions. In addition to this, there is ECHO-10HS soil moisture sensor which is a new addition in the soil moisture sensor family and possesses high-frequency oscillation, which enables the sensors to accurately measure soil moisture in any of the soil or soilless media with minimum salinity and textural effects.
In order to measure soil water content and salinity, Zemni et al. [100] used 5TE sensors at different soil depths to assess dielectric permittivity (Ka) and electrical conductivity (ECa). It is to be noted that 5TE sensors are based on frequency domain reflectometry (FDR); therefore, they use a fixed frequency wave of broadband signal which makes the device cheaper and more compact. Nolz et al. [101] deployed hydro probe2 sensors to evaluate near surface soil water and determine in situ water retention function. Hydro probe sensors are advantageous due to their linear signal response. On the contrary, hydro probe sensors are not suitable for sandy soils [102]. Udukumburage et al. [103] used an MP406 soil moisture sensor to verify the saturated condition of the expansive soil layer. They also used this sensor to measure volumetric water content values in the soil column during the wetting and drying process [104]. In order to maintain the indoor ecosystem services, air quality plays an essential role. In this regard, MIKROE gas sensors are used to monitor the air quality [105,106]. To evaluate and assess the vegetation change and study physiological and metabolic response of corn fields and paddy fields, the Pogo II VWC has been widely used [107,108].
Hu et al. [109] used Portable X-ray Fluorescence Spectroscopy (PXRF) to assess the heavy metal content in soil for which they covered 301 farmland soils from Fuyang in Zhejiang Province, in the southern Yangtze River Delta, China. Conventional methods for heavy metal detection such as Atomic Absorption Spectrometry (AAS), Atomic Fluorescence Spectrometry (AFS), and Inductively Coupled Plasma Optical Emission Spectroscopy (ICP-OES), are expensive and lengthy procedures which are executed in laboratories. Therefore, these methods are not taken into consideration for rapid testing and high-density evaluation of soil heavy metals contamination. As an alternative method for rapid heavy metal detection, Portable X-ray Fluorescence (PXRF) was used to assess cumulative concentrations of soil heavy metals based on linear regression models between fluorescence intensity and specific heavy metal concentration. Due to its ease of use and rapid testing ability using non-destructive quantification, PXRF has been widely used by researchers in numerous domains [110][111][112][113]. For the heavy metal assessment in agricultural soil conducted by Hu et al. [109], VNIR sensor was used to anticipate soil properties comprising pH, soil nitrogen, and carbon [114,115]. In addition to PXRF, NixPRO color sensor can also be used to identify hotspots and total spatial area in excess of environmental thresholds in landfill soils [116].
Lately Zhao and Liu [117] have developed a Portable Electrochemical System (PES) for on-site heavy metal detection on farmland. Their system was composed of a threeelectrode configuration which comprised a signal acquisition system integrated with a microcontroller-based potentiostat to perform square-wave anodic stripping voltammetry. Their system was assessed by testing the detection of pd(II) and cd(II) in acetic acid soil extracts and acetate buffer solution [117]. However, their system did not include any wireless sensor module to transmit heavy metal composition data.
Other than the aforementioned sensors, there are several other wireless sensors dedicated to: photosynthesis, i.e., Beta Therm temperature sensor; leaf wetness sensor, i.e., SLWA-M003; precision sensor for leaf temperature, i.e., ∆LA-C; light intensity sensor, i.e., BH1750FUI sensor [118][119][120][121][122]. With the advent of these sensors, CO 2 sensors also play an essential role, especially in greenhouse systems [123]. CO 2 sensors have also been widely used to measure the subsequent level in peat soil, landfill, and forest control site [124,125]. In the smart farming ecosystem, the growth and quality of the fruit bunch cannot be neglected. In this regard, there are dedicated fruit growth monitoring sensors which researchers have used in their domain of plantation. Thalheimer [126] designed an optoelectronics sensor for monitoring fruit and stem radial growth. Their developed sensor was lightweight and easy to install with low maintenance. Nonetheless, the sensor was well tested in open field conditions. In addition to this, the effect of gas concentration during the fruit growth was studied by Ma et al. [127], for which a smart ethylene electrochemical sensor was established to investigate ethylene emission from fruits. Lately, Hanssens et al. [128] came up with a heat field deformation sensor to measure sap flow dynamics through the tomato peduncle. Heat griddling of the peduncle was performed to differentiate flow of xylem and phloem with respect to developing fruits.
Capacitive sensors calculate SM on the basis of changes in soil capacitance due to differences in water content [129]. Commercial UTs use capacitive sensors, which are usually more accurate than resistive sensors but cost more [130]. Ground Penetrating Radars (GPR) [131] are based upon electromagnetic wave absorption and reflection. SM sensing uses impulses, frequency sweeping, and frequency-modulated technologies. This method is used for measuring soil moisture near the surface (up to 10 cm). The most reliable soil humidity samples used in fields are neutron scattering samples [132] and scattering samples use radiation methods for calculating SM by estimating changes to the neutron flux density due to water content of the soil [133,134]. However, in such cases, specific licenses are required to carry out its implementation.
Numerous research studies have been performed to develop electrochemical devices for various applications, which are known as potentiostat [135][136][137][138][139][140][141]. Lately, an Arduinobased potentiostat was fabricated from cost-efficient components and was able to execute simple electrochemical experiments, whereby the results were recorded and analyzed in a Windows operating system via USB interface [136][137][138]. As an addition to Arduino-based potentiostat, Raspberry Pi (RPi) controller was also used to execute the electrochemical experiments, whereby the results were displayed on the LCD touch panel connected to the controller [139]. Both Arduino-and Raspberry Pi-based potentiostat have the potential to incorporate wireless sensors for data transmission; however, these controllers do not contain a built-in Analog to Digital Converter (ADC) and Digital to Analog Converter (DAC) which make the overall design more sophisticated. In this regard, Hanisah et al. [142] came up with a portable Heavy Metal Potentiostat (HMstat) to detect heavy metal composition on-site. Their potentiostat comprised a digital Control Signal Component (CSC) and the electronic component, which is the analog Potentiostat Read-out Circuit Component (PRCC), as shown in Figure 5 [142]. Nonetheless, it is worth noting that both the Arduino and RPi controller board do support the incorporation of various sensor modules. Therefore, researchers have room to incorporate soil moisture and temperature sensors along with other sensors depending on the slots available in the controller; thus, an integrated system for soil moisture and heavy metal analysis can be developed. Other soil physical properties can be calculated to populate the map of the soil with other soil properties such as soil organic content, pH, sand, silt particles percentage, and nutrients such as Mg, P, OM, Ca, base saturation Mg, base saturation K, base saturation Ca, CEC, and K/Mg [143][144][145]. In situ, calculating these properties in real time also faces challenges due to scale, cost, and technology limitations.
In precision farming, some of the long-lasting decisions can be taken using yield monitoring. This method helps in providing spatial distribution of crop yields at the end of the growing season [146,147]. Yield sensors are normally mounted on farm equipment and capture yield data automatically in the course of the harvest. In particular, mass flow sensors on grain containers are mounted to record grain inflows along with the position [148]. The collected data are analyzed with tools such as ArchInfo, Mapinfo, and Environment System Analysis International [149].
In order to get an insight into the crop yield combined with field topography, Electrical Conductivity (EC) sensors are used [150]. Soil's ability to conduct current is measured by electrical conductivity. EC assessment is used to assess the use of phosphorus, cations in water, drainage, and rooting depths [150]. EC maps are used for zoning the area. The zoning is also used to incorporate precision agricultural practices such as variable rate irrigation, variable rate seeding, and drainage management. Electromagnetic Induction (EMI) methods can be used for the mapping of the EC by apparent Electrical Conductance (ECa) and Visible Near Infrared Reflectance (VNIR) [151]. There are a number of commercial tools available, i.e., Veris 3100, EC400 sensors in conjunction with GPS systems [149,152].
In the domain of soil sensing, macronutrients such as nitrogen, potassium, and phosphorus are essential to the growth of crops. The evaluation of these nutrients helps to assess the effects of fertilizer and potential applications. The optical detection is based on reflectance spectroscopy to measure the macrosimulation's reflection and absorption [153,154]. A sensing system using planar electromagnetic sensors has been developed in the detection of nitrate and sulphate concentration in natural water resources [155]. This approach is used to detect the amounts of nitrate and sulphates by correlating the impedance of the sensor array with their concentration. The key approaches to soil macronutrients include electrochemical, VIS-NIRS, and ATR spectroscopy [149,152,156]. These approaches to soil macronutrients are limited to sensing a single desired ion because the membrane used in these methods only reacts to one ion [157]. To achieve a simultaneous multi-ion sensing, it is necessary to build a detector array for the sensing of soil macro nutrients [158].
There are several opportunities to advance the state of precision farming through the utilization of the above discussed sensors. The following Table 2 summarizes the list of sensors along with their functionalities which can be widely utilized in the field of precision agriculture.  WSNs typically consist of a large number of nodes that run in a particular configuration. Usually, autonomous and spatially dispersed sensor nodes collaborate to track and collect environmental conditions. Data can be processed in central/decentralized mode by sending data to a sink that transfers them to other networks (e.g., through a gateway). A broad variety of application-specific limitations is included in the project, design, prototype, and use of a WSN.
The BTnode is a Bluetooth-based radio module and microcontroller for autonomous wireless communication [159]. BTnode is equipped with general purpose interfaces which can be configured on the basis of application specific requirement. BTnode can be utilized with several peripherals, i.e., sensors, actuators, RFID, and GPS receivers. A promising factor of BTnode is its compact size of 6 × 4 cm with standard wireless interface. A pictorial description of BTnode is shown in Figure 6. The device comprises an Atmel ATmega128L microcontroller with on-chip memory and peripherals [160]. The microcontroller demonstrates an 8-bit RISC core delivering up to 8 MIPS at a maximum of 8 MHz. The on-chip memory comprises a programmable in-built 128 KB of flash memory along with 4 KB of static RAM. Other integrated peripherals consist of JTAG for debugging, timers, counters, pulse-width modulation, and 10-bit analog-to-digital converter.  Figure 7. SensorNet platforms, like most embedded systems, are tightly coupled to their applications and this can also be incorporated over parallel programming paradigm to enhance processing and reduce execution time [161,162]. A key aspect of Epic is the support of prototyping and reusability using composable hardware architecture. The research and development of Epic was carried out at Computer Science Division, University of California, Berkeley, in 2008 [161].  The CM5000 TelosB sensor was developed to measure temperature, relative humidity, and light intensity. The sensor is IEEE 802.15.4 compliant wireless sensor node based on the original open source TelosB/Tmote Sky platform design which was developed by the University of California, Berkeley [164,166,167]. Figure 9 shows the pictorial description of CM5000-TelosB sensor. The Preon32 module is tailored for short-range wireless networks and is equipped with a universally usable sensor and actuator platform [169,170]. Figure 10 pictorially represents the Preon32 sensor. Preon32 is incorporated with Cortex-M3 controller which is compatible with IEEE 802.15.4 radio frequency module. In addition, this module enables developers to develop the wireless module codes using an object-oriented programming language like Java [169]. It also demonstrates the functionalities of external interfaces, i.e., USB, CAN, and SPI, etc. [164,169]. The Mica2 Mote is shown in Figure 11. These motes are CrossBow Technology's mote technology of the second and third century. In combination with the CC1000/CC2420 RF Module, Mica2 and MicaZ use the Atmega128L controllers [171]. With the interface support for the link to the mote, the Mica2/MicaZ are fitted with moisture, temperature, and light sensors [162]. These motes also measure barometric pressure, seismic waves, etc. [172][173][174]. Usually, the sensor nodes of a WSN consist of three basic building blocks: sensors, computer units, and communication units. The sensor nodes need a working device, a routing protocol, and eventually a simulator to allow a WSN to function properly.

Epic is a new open mote platform for SensorNet modules. Pictorial view of Epic is shown in
The most critical issues concerning WSN include the lack of standardization of the hardware nodes, limited consumption of energy, communication latency, out-of-order and loss of packets, distributed reconfiguration and scalability factors. In this regard, the Operating System (OS) acts at the helm to arbitrate the resource access. It is worth noting that the primary OS's for WSNs are TinyOS, MANTIS, Contiki, Nano-RK, and LiteOS [175].
TinyOS (TOS) is open source, modular, component-based, module-specific and built for wireless sensor networks [176]. Nonetheless, this OS complies with programs which require very low memory and also comprises numerous libraries that manage network protocols, distributed services, transducer drivers, and data collection tools. TinyOS uses a monolithic architecture class to construct a static image on the node using the component model. TOS offers multithreading support from version, named TOS Threads, using a cooperative threading approach. In order to come up with a lightweight open source OS, Contiki was developed by the Swedish Institute of Computer Science [177]. The promising factor of Contiki is its portability factor which is based on an event-driven kernel. Contiki includes so-called protothreads, which can be used at the individual process level. Nonetheless, Contiki includes many applications supporting features like the multitasking kernel, preventive multithreading, prototype threads, TCP/IP protocol, IPv6 protocol, light telnet client, and quick web server etc. [178]. It is worth noting that Contiki supports dynamic memory management; it does not support applications in real time [179].
With the advent of cross platform requirements, the multi-threaded WSN models were developed. The MultimodAl system for in situ wireless sensor (MANTIS) NeTworks [164] is a multi-threaded WSN operating system. MANTIS is an easy-to-use OS that includes kernel, scheduler, and network stack, and is compatible to be used across various platforms, i.e., PDA or a PC.
In addition, Nano-RK was built for WSNs based on multitasking [175]. The design objectives for Nano-RK include multihop networking, effective power management to extend WSN lifetime, limited resources lighting applications, and priority scheduling. LiteOS based in Unix was developed by the University of Illinois at Urbana-Champaign [164] in order to support the programming paradigm for WSNs. LiteOS offers a familiar Unix, thread, and C programming environment and is built using a hybrid programming model which allows programming, both event-driven and thread-driven. Some of the common wireless nodes which can be used in precision agriculture are summarized in Table 3 along with the details of the transceiver and microcontroller. Now, the question is how the previously discussed sensors could be deployed over an IoT-based High-Performance Computing (HPC) framework with optimized scheduling. In this regard, the next subsection discusses the significance of Edge Computing.

Role of Edge Computing
It is essential to look at data that can be processed immediately close to where the data originate with the help of edge. So, at the edge there is a requirement of some kind of storage, computing ability to be able to take care of real-time processing needs. For long-term retention for data analysis realistically, some planning activity is to be done in the cloud. Therefore, if that is the case, then what kind of storage solutions are we looking at? In this regard, an edge needs to be designed in such a way that it could possess local processing power needed in decision-making ability and largely it is going to be right intensive. Thus, some storage is required at the edge level which is going to be fast, i.e., largely of course solid-state drive to overcome the issues of low latency. However, in the current scenario, data analysis and long-term planning are essential; therefore, users may compromise with lower degrees of latencies, but the factor of storage remains a priority. The prominent challenge in edge computing is with respect to the volume of the data. Having so many sensors deployed for computing, the heterogeneity of data themselves is another challenging issue. The coherency of data always exists at the edge level and it is essential for the user to correlate the data to discrete points, and without this correlation, one cannot get insights for the generated data. Now, to maintain correlation of high-speed data becomes another bottleneck in edge computing. To overcome this issue, the workflow optimization along with energy aware scheduling criteria becomes a necessity for edge computing. In this regard, flexibility and agility could be achieved with lower cost, whereby rapid provisioning of data could be enabled with continuous innovation, free flow of data transmission could be observed to and from sensors without being clogged, on demand analytics with hybrid cloud and multicloud deployments could be met, and distributed storage could be created in order to manage high-volume generated data. Having mentioned the aforementioned parameters, it could be asserted in a nutshell that agility and flexibility need to be maintained at the seconds or subseconds level of computing to manage the real-time complex problems. Nonetheless, this has become possible with the help of IoT device sensors. Since at the edge level, a finite amount of storage is being maintained, therefore the workflow optimization is to be designed in such a way that it can meet the real-time computing demands in seconds or subseconds level, i.e., the defined system needs to be able to address this problem of getting the data that come in quickly and starting to process them to gain some insights into certain correlation and then keep that storage free for the next set of data that is coming in. Therefore, with respect to workflow optimization, we need to look at the set of devices which needs to be employed to be able to address all the data that are coming in. In this context, if a High-Performance Computing (HPC) framework could be set over the edge level, then the aforementioned issues are feasible to be resolved. It is essential for the working of HPC framework attached to the edge to smoothen the workflow optimization and scheduling criteria.
Various edge nodes require various types of resources. To this end, it is necessary to select an appropriate scheduling approach to ensure the consistency of resources and the availability of services. Researchers have suggested resource continuity management approaches, such as the layered model Fog to Cloud (F2C) and OpenFog Reference Architecture (OpenFog RA) [180,181]. The F2C layered model is a novel architecture focused on data sharing and data integration that can achieve service parallelization and less service execution time. OpenFog RA has been designed to meet the same F2C objective [181]. Therefore, researchers are proposing a distributed management system incorporating edge and cloud tools to efficiently achieve resource consistency within a traditional hierarchical architecture [181,182].
Li et al. [183] came up with EveryLite, a lightweight scripting language for resourceconstrained, heterogeneous edge devices. Such tasks which are both time-limited and space-complex are referred to as microtasks by interfaces in the migration process. In edge computing, EveryLite can perform microtasks. Kang et al. [184] designed a lightweight scheduler that can automatically schedule tasks of different layers of Deep Neural Networks (DNN) between mobile devices and the cloud data center without profiling each program. By becoming adapted to the lightweight scheduler, working professionals can be adapted to a range of low-latency and energy-efficient DNN architectures, hardware systems, wireless networks, and server workloads.
By embracing cooperative competition and game theory, Zhang et al. [122] established CoGTA, a system for allocation of tasks. For edge computing systems, CoGTA aims at delay-sensitive and social-sensing applications. CoGTA may tackle a few crucial problems, such as Bottom-up Game-theoretic Task Allocation (BGTA). Similarly, the Markovian stochastic channel was used by Zhang et al. [185] to provide an optimal solution and offload strategy for collaborative operation between cloud and edge devices. This problem of minimal energy scheduling tasks can be formulated on directed acyclic graphs as a restricted, shortest path problem. This problem is then solved using the regular Lagrange Relaxation-dependent Aggregated Cost (LARAC) algorithm.
Kwak et al. [186] suggested a dynamic allocation algorithm for CPU/network resource or task in the mobile networking context. To scale the CPU/network speed, they used the Lyapunov optimization technique. Meanwhile, Liang et al. [187] proposed a new approach to resource management by taking into account both bandwidth availability and source selection.
Data are distributed in edge computing which requires distributed data processing, storage, and networking resources [0]. In addition, edge devices tend to be heterogeneous, leading to a heterogeneous runtime environment and heterogeneous data on-edge device. Furthermore, resources are limited on edge apps. As such, proposing an optimum, complex, and energy-aware scheduling strategy in edge computing is complicated. If resource abstraction and edge OS management would allow developers to focus on their applications without trying to think about hardware, connectivity, and code written for specific devices, this would be a huge leap forward for complex projects to be realized. This will reduce complexity, simplify growth, and reduce edge computing costs for the ecosystem.

HPC on Edge (HPCE)
This new High-Performance Computing (HPC) solution seeks to move beyond the agricultural services offered on edge and provide a comprehensive platform for precision farming and animal husbandry and furnish with utility not only for farmers but also for stakeholders. The HPCE architecture is adapted from CYBELE conceptual framework [2]. The HPCE model uses open and proprietary vast amounts of datasets, including sensor readings, as well as satellite data and historic climatic and environmental information for ready reference. While this would be the most effective way to use HPC technology, it only uses the latest software platforms and projects that are being developed by HPCE's econtrolled services, as well as increased HPC e-infrastructure to enable huge heterogeneous data processing to be done and find modern solutions to complex problems using dedicated algorithms. Due to the interconnection of large-oriented approaches, varying datasets, and available big data techniques, it is possible to scale distributed big data research to enormous scales when holding many types of datasets together in one place [2]. In doing so, it enables the aggregated data and metadata to be aligned semantically to a standard scheme and data model and enables advanced data analytics to take secret information into account. In addition to this, the HPCE architecture will also help in gaining insights from adaptive data visualization services.
With reference to CYBELE [2], the architectural approach of the HPC on edge is illustrated in Figure 12. By organizing a product component based on interdependencies, this is intended to highlight the importance of pipelines being constructed to promote compatibility and show how to maintain the integrity of interdependent services. It is worth noting that CYBELE resonates well with the EdgeX platform architecture. EdgeX platform comprises four core services, i.e., device services, core services, supporting services, and application services to enable smooth workflow optimization [188]. In addition, it will be interesting to see a synchronization of EdgeX with a dedicated HPC framework for faster batch processing of data over edge. Big, heterogeneous data are made available through repositories powered by HPC which is responsible for the processing at the edge layer. In this regard, as can be seen in Figure 11, HPC frameworks such as Spark, Hadoop, YARN, Big Deep Learning (BigDL), Directed Acyclic Graph (DAG), and Kubernetes are deployed for the batch processing of data using distributed framework attached to the edge layer [189]. It is worth noting that Spark and BigDL are the widely used frameworks in many organizations for their open source and high degree of interoperability features. Spark and BigDL are based on MapReduce framework which has high room for tuning for smooth workflow optimization [190]. The transmission of the application process interface along with data from the cloud layer to the edge layer is conducted using 4G/5G or fiber/DOCSIS/DSL communication system. This is seen on the middle section of the architecture as shown in Figure 12. At first, the data are processed in the background prior to being passed on to the check-in stage for data validator or timestamp validator for resolution of data verification and timing problems. Once data are obtained in edge layer, quality checks are conducted to identify anomalies and any other data irregularities, maintaining their accuracy and validity, which are accompanied by a series of measures aligned with processes of data cleansing.
Finally, the HPE data provenance service provides the mechanisms required for recording all relevant information concerning incoming data of interest. With HPE, the data provenance platform is inherently connected to the data policy and asset brokerage engine that enables the platform to bind data providers and data users with data share and business features. In addition to facilitating interoperability and reuse of data, the inspected data are annotated and harmonized semantically. Since the data come from a variety of physically distributed data sources, a standard data model will be created for the semantic definition and annotation of the data. To facilitate the pipeline and allow the various heterogeneous components to communicate seamlessly, the model will be used as a common language to annotate data and exchange messages between the components. Clean and semantically uplifted data are then available, i.e., open and proprietary data to be queried, analyzed, and viewed. An exemplification of how ground sensors have their data stored and analyzed at cloud data base is shown in Figure 13. The on-field data are continuously assessed by a real-time monitoring system to ensure triggering effects if any threshold point is crossed. Simultaneously, the on-field data are also stored in the cloud database from where the user can download the required data and at the same time, data analysis could be applied using the machine learning tools stored over the cloud database. To facilitate simulation execution, a defined experimental composition setting is designed, as shown in the top right part of the architecture (cloud layer) in Figure 12. The composition framework of experiments aims to support the separate design, development, and execution of big data research procedures, the support of embedded scientific computation and reproductive tests. In the analysis method, its subsequent template is selected to provide each analytical template with its own software and execution endpoint and allow the user to modify the appropriate configuration variables (i.e., input algorithm, execution parameters, netting parameters, and output parameters). The results of each analytical template are presented. The composition system for experiments will promote the design and implementation of data analysis workflows consisting of a number of data analysis procedures, interconnected in terms of data sources and input and output artifacts. The outcome will constitute the input to another research template when a template is executed. The output of the research model is an object for session that contains all the memory output values.
In addition to big data, advanced analysis must be implemented when selecting input datasets and developing workflows. For HPCE, advanced analytical algorithms are available to stakeholders that allow them to explore various forms of data visually and to find and solve new trends. In order to achieve improved delivery and monitoring, machining and predictive modelling methods should be modified so as to handle the predictive life cycle of data planning, detection, and analysis. However, the implementation of advanced analytics along with huge, complex data increases the need for strong computing power and a higher processing memory, so that information can be collected within a realistic timeframe. When the test cases are executed, multiple HPC attributes are needed, including storage power, speed of the device, memory capacity, and quick turnaround time.
The next section discusses the IoT-based communication methodologies in edge computing used for precision farming developed by several researchers.

Edge Computing in Precision Farming
IoT incorporation in precision farming has brought about changes in the communications of actuators and sensors with remote servers. With respect to networking technologies, modern IoT-capable nodes provide new energy-saving transceivers and network topologies that are tailored to field conditions where mobile and WiFi base stations are rare [191]. Multiple topologies that use wireless sensor networks can route data messages via communication nodes to reach a gateway with the internet connectivity, as shown in the proposal from Akka and Sokullu [192].
More recent developments with IoT involve network protocols to communicate through the internet with remote devices via applications designed for data reduction. For monitoring purposes, for example [191,193,194], researchers used the MQTT protocol for data collection from sensor nodes at greenhouses. These protocols allowed the gathering and analysis by Shukla et al. of data at intermediate cloud middleware [195]. A further expanded analysis of this topic can be found in the work of Kalox et al. [196]. A gateway using ZigBee collects data from a real deployment of sensors, which are then sent to a data cloud driven by FIWARE through web-based protocols. The work takes advantage of open interfaces to build a number of client applications that can access the cloud module. However, no IoT protocols are used, and only an early version of FIWARE is used. Martinez et al. [197] presented research on how to handle crops in PA environments using the cloud plane. The FIWARE core is used here, along with a collection of additional enablers, to communicate with IoT gateways through a variety of protocols, such as Message Queuing Telemetry Transport (MQTT) or Constrained Application Protocol (CoAP), where current and historical data are stored in the cloud for analytics. The output of FIWARE is assessed for PA using a collection of synthetic tests, but no real implementation of the proposal is provided. As per Zyrianoff et al. [198], a refined optimization has to be made in FIWARE to get it implemented over fog computing domain.
The incorporation of intermediate processing stages in the data path is an evolution of mainly cloud-based platforms. Before sending monitored data to the cloud, Liu [199] performed local preprocessing at data collection gateways. Ferrandez-Pastor et al. [200] expanded on this concept by evaluating a range of IoT protocols and technologies in a real hydroponic implementation to achieve effective computation-offloading. Moreover, a similar method for computation offloading was also implemented by Chang et al. [201] in the domain of aeroponics. However, in these works, a lack of flexibility is noticeable in the way edge computing is implemented, and this layer is exclusively oriented to data fusion. Guillen et al. [202] proposed a hybridization of Artificial Intelligence (AI) with IoT in precision agriculture. However, it was found that there is still a big gap between AI and IoT due to computational resources. In this regard, they proposed an inclusion of Graphical Processing Unit (GPU) in the edge device to enhance the computational services [202]. For an efficient computation offloading, Chen et al. [203] proposed ThriftyEdge which has the substantial potential to support computational intensive tasks by proper offloading across local device and edge cloud in proximity. ThriftyEdge is well suited to be deployed in ad hoc networks for precision agriculture [203].
The IoT-based generic monitoring system was defined by Oliver et al. [204]. It was deployed and validated on floriculture domain, with a setup of monitoring weather and soil conditions. Strategically, the goal was to foresee such diseases which could impede plantations proactively. For example, bacterial leaf spots, damp-off root rots, soft rots, and bacterial spots are among such diseases. HPE's overall architecture is cloud-centric and uses an edge computer node to gather information from the distributed sensor network. MySense is a generic framework for the rapid development and use of precision wine scenarios monitoring application [205]. It consists of four layers, including sensors/actuators, WSN/gateway, web, and cloud applications. For local tasks and real-time alarm generation, fog computing is used on the WSN/gateway layer. The platform was used in a winery to study the dynamics of diseases in the current microclimatic setting.
The necessary ingredient that makes farming operations work is consistent, productive soil. Lavanya et al. [206] came up with an Internet-of-Things-based sensing framework for assessing nitrogen, phosphorous, potassium (NPK) concentrations in soil. In order to allow a colorimetric approach in the sensor, Light Dependent Resistors (LDR) and Light Emitting Diodes (LEDs) were used. A fuzzy rule-based method implemented on an edge computer using Raspberry Pi was used to assess the sensed values pertaining to nutrient deficiency. To assess other nutrient shortages, additional rules were added to this rationale. This method was low-cost and provided a quick alternative compared to laboratory testing methods, which take a longer time and are also costly. Soil fertility is optimized by assisting farmers in effectively managing their soil nutrition, resulting in cost savings, improved field management, and increased environmental conservation by eliminating runoff and leaching pollution. Park et al. [207] presented an exemplary case study in the domain of tomato production that demonstrated how edge computing generated scalable data analytics. In this case, a Raspberry Pi served as a sensor setup base station and a network edge node. On the edge node, a prediction analysis was implemented for the growth state of cherry tomato, and the data generated were sent to a cloud-based central server for model integration and analytical interpretation to gain insights to predict results. This strategy not only reduces data flow, but it also allows farmers to preserve their data.
Atmospheric temperature is a critical factor for the productivity of plants, and in this regard, it plays a prominent role in irrigation planning and greenhouse management. Krintz et al. [208] used Single Spectrum Analysis (SSA) along with linear regression to introduce a temperature forecast system using low-cost microcontrollers and single board computer. The introduction of edge computing in their methodological paradigm drastically reduced the factor of latency. The advantageous part of their developed system is that the farmers can opt for a microclimate monitoring network rather than installing a sophisticated weather station.
Fan and Gao [209] also looked at task parallelism in mobile edge computing. An offloading delay may arise because of the transmission characteristics. In addition, computation delay normally happens over cloud transactions while determining when to continue with the operation. Merelli et al. [210] looked at edge computing as a foundation for metagenomics research in agriculture, and found feasibility for remote microbial studies of water, air, and soil. Traditional methods for metagenomics research necessitate a large amount of data transfer to the cloud. However, with the advent of advanced edge technologies, remote analyses can be performed, and the results can be sent to the cloud using a combination of System-on-a-Chip (SoC) and edge computing. A mix of edge and cloud provides a highly appealing approach to provide complete analysis workflows. The results of the experiments revealed a 95 percent reduction in data streaming, thereby demonstrating the feasibility of metagenomic research at a remote level. For singular analyses, an edge solution is feasible. On the other hand, a subsequent work by the authors in the domain of metagenomics revealed that shifting computation to the cloud improves cost and efficiency as the frequency of analyses increases [211]. Nonetheless, if AI and blockchain can be incorporated over IoT services, then the farmers and the stakeholders will obtain a better understanding of the crops along with a fast and easy way to characterize genetically modified crops [212]. In addition, with the help of AI, water usage can be optimized and it will also be possible to determine whether the treated wastewater is suitable for irrigation at a given point in time and what are the relevant crops on which the treated wastewater can be used, depending upon its composition [212]. Table 4 summarizes previous researchers' edge computing techniques in their respective agricultural domains.

Challenges and Considerations for Farmers
Advanced technologies which can provide economically competitive domain to farming sector along with financial viability whilst enhancing environmental efficiency and being socially acceptable are the need of the hour in terms of sustainability. However, given the availability of capital, meeting these sustainability targets would often entail trade-offs. Furthermore, the objectives are "moving goals" that must adapt to new problems and priorities. Technological advancements are rapid; however, their deployment in the farming sector remains incomplete. It is quite common practice with the farmers in developing nations that they tend to opt for trial-and-error methods in technology adoption rather than following a systematic way. This could have significant consequences for farm structure and the number of farmers who will be able to make a living in the future.

Awareness Regarding the Latest Ongoing Technology
An initiative toward better farmer education and training along with the help of financial resources, non-government organizations, the media, and the general public can contribute to making sustainable farm technology adoption easier. Dedicated laws can be put forward by the government which may comprise incentives and disincentives for the adoption of the latest technology. Environmental laws along with zoning codes, animal welfare guidelines, and public health policies, are increasingly constraining farmers' actions. In this regard, there is a deemed requirement for tailored digital technology which the farmers should get acquainted with. However, because of the numerous parameters comprising policy factors and economic situation at the helm in different contexts, there is no adequate explanation for why farmers implement specific technologies. Therefore, it becomes necessary for the respective governments to furnish substantial knowledge and infrastructure to farmers to uplift their respective agriculture segments.

Government Support to Provide Adequate Infrastructure
It is important to determine which innovations are most effective in particular situations in respective agricultural segments and it is also important to ensure an appropriate mechanism to provide incentives to promote the achievement of sustainability goals for the benefit of global welfare. Rationale for priorities of food production in an environmentally friendly way is often accomplished by the use of suitable technologies. To achieve these objectives, some goals need to be tweaked in agricultural activities by aligning interests with those goals. Additional perks can be allocated to the farmers who understand the benefits from technology and practice them.
More follow-up is needed in monitoring the implementation of innovations in order to ensure transparency in policy factor and research activities pertaining to the adoption of new technology in the agrisector. Post implementation evaluations of results will help to correct mistakes before too much money is pumped into the wrong segment. This is critical because agricultural innovations come from a variety of places. Rating technologies and predicting potential future patterns will aid policymakers in moving toward sustainable agriculture.
A broader participatory approach involving a variety of stakeholders would promote the implementation of innovations for sustainable farming systems. Farmers along with consumer groups and the associated agricultural food industry who are inclined towards sustainable farming should be included as stakeholders. Since sustainable technologies are applied at the farm level, therefore the farmers must be involved in the technology adoption discussion. In an ideal world, there will be a stronger sense of ownership in the selection of technology in the entire agricultural food chain. Farmers' adoption of technology is influenced by the associated industries. However, the industrial segment should learn from the farmers' requirements, which will help them to standardize the latest technology, which in turn will make a substantial impact on the farming sector.

Soil Analysis to Promote Variety of Crop Growth
In countries where farming is still done in the conventional way, farmers grow crops by planting without understanding the properties of soil and its quality. As a result of this, in the long run, farmers will not benefit from the amount of money they will earn from their farming. The current soil testing process uses a manual method which first involves the sampling of soil and then the submission of samples to laboratories for analysis. Due to the lengthy and laborious process, this manual process is inefficient. Because of human interference, there is a risk of human error. As a result, farmers could obtain inaccurate information. In that case, there is a need for an automated method for soil testing and crop prediction. Soil testing is crucial because soil testing assists in understanding the fertility of soil and this allows predictions to be made about the potential crop yield. Therefore, a system could be proposed that consists of a handheld device which will provide a pH reading and will help estimate the quantity of nitrogen (N), phosphorus (P), and potassium (K) in the soil. In addition, a classification algorithm can be developed to determine crops suitable for specific applications based on the data obtained from the system, and accordingly the appropriate fertilizers for the field can be provided.

Providing Meteorological Services to the Farmers
Bringing weather and climate knowledge into agricultural decision making has contributed to an increase in agricultural production in many countries. However, in developing countries where several small farms are rain-fed, it is difficult to get access to weather and climate information to help direct decision making. Government officials should consider this critical knowledge which is useful to farmers and others dealing with poverty and hunger. This situation continues because national meteorological and hydrological services in developing countries do not receive adequate funding to cover the expense of delivering these services to the farmers. The government lacks substantial information about the significant role of meteorological services which contribute to the socioeconomic development of the nation. This state of obliviousness prevails even though governments confront multiple challenging issues in the realm of agriculture, water resources management, health, and disaster risk mitigation, all of which are heavily affected by weather and environment.
Despite repeated periods of drought and crop failure, as well as occasional famines, flooding often leads to losses of human life and major property destruction. In addition, it also causes wide-ranging impacts on socioeconomic growth. Therefore, it is only with the advent of recent development that there has been substantial study into quantifying the benefits of weather and climate knowledge-related services. It is deemed necessary to take small steps by undertaking pilot projects to research the socioeconomic gains of using weather and climate information-related services in agriculture.

Yield Production
The feasibility of smart farming relies on internet connectivity and a panel to accommodate the sensor hub. Using these features, it has become easier for the farmers to monitor the process of cultivation using their smart devices. With the aid of sensors and interconnectivity, the smart farming initiative helps farmers to optimize the consumption of water, pesticide, and fertilizers to maintain the yield quality by maintaining several parameters such as soil condition, level of pesticide, temperature, and humidity. The system can be made more successful by combining the fertilization and pesticide spraying systems, all of which can be managed with an IoT application. Farmers may decide which variety of crop is compatible for cultivation with their respective farm. Accordingly, the farmers can opt for innovative technologies such as drone-based farming and various weather prediction tools, etc.
Young agropreneurs involved in cultivation business can benefit from smart farming in terms of farm maintenance, irrigation, fertilization, and pesticide application. The sensors in the smart farming paradigm are tailored to report various readings, including measurements pertaining to the number of pesticides and fertilizers, irrigation pump status, humidity, and temperature. The readings also provide details pertaining to the growth timeline of the crop, as well as the crop type, i.e., when it was grown, the date it was cultivated, and how much was harvested. In agriculture, IoT is seen as a prominent and promising factor in the agricultural domain which can boost the yield in a quick manner. In addition, the smart farming paradigm can also serve as an avenue for the startup companies to invest in.

Sustainable Land Use
There have been empirical studies that have attempted to quantify the effect of agricultural policies associated with land use sustainability; however, these studies turned out to be inconclusive. Although different opinions on the relationship between prices and soil deterioration derive from differences in discount rates and risk aversion preferences, it is important to define these differences as this allows for better clarification when participating in discussions with others. To understand the impacts of changes in relative prices on agricultural resource distribution, four different responses can be distinguished: (i) expansion of the total agricultural area (extensification); (ii) rise in the number of agricultural inputs used, also known as intensification; (iii) change in technology; and (iv) change in crop choices. A differentiation is to be made among recurring costs that are capable of raising productivity and fixed asset investments that work to enhance soil quality in the long term.
If greater agricultural production occurs as a result of increased area, impact on the environment in terms of deforestation, overgrazing, flooding, and sedimentation is a likely result. If there are changes in cropping activities at the same time as the expansion of the land area, then the new cropping activities will have an effect due to the soil quality that depends on the negative impacts of previous cropping activities on the resource. Therefore, it is unclear whether the interplay among agricultural policies, along with the supply response of farmers and the implications for sustainable land use has been adequately explored.

Conclusions
The scope of the current paper is to introduce and pave the way for smart sensing with edge computing technology in the developing nations, whose gross domestic product relies substantially on agriculture. In this regard, the applicability of various sensing technologies with an ease of edge computing has been put forward in this paper. Smart sensors offer intriguing possibilities for precision agriculture. As of now, ongoing research in edge computing and smart sensing for agricultural domain is only in its initial stage. Nonetheless, prototypes of edge computing systems have already been developed by many researchers for specific agricultural domains; however, the interpretability of edge computing techniques with various sensing units still remains a challenge. There is a need to set up and deploy cost-effective high-performance computing-based edge nodes to enable smooth data flow operations for precision agriculture. Implementing these sophisticated and efficient edge technologies will solve these issues and in a broader perspective, this will open up a new segment for farmers in developing nations. In addition to this, a major problem to be dealt with in this context is inadequate internet connectivity, which is seen as a global issue and which affects the growth of developing and underdeveloped nations because not every region of the world has access to the internet. In a nutshell, to uplift the agricultural domain in developing nations, a dedicated cost-effective infrastructure is required which can completely digitize the farming sector in the best possible way.