# Towards Climate Smart Farming--A Reference Architecture for Integrated Farming Systems
## 3 MiFarm-CSA Architecture  
MFS is characterized by multiple instances of crops, livestock and forestry, which may be in small or large geographical areas. Currently, MFS is not characterized by intense use of information and communication technologies (ICT) and where it exists, it is only used separately per farm or livestock level. In addition, current approaches are either very simplistic, omitting important aspect of MFS, or rather complex, making them impossible to implement, which generate drawbacks in management and at the economical level that prevent farmers from adopting MFS. MiFarm-CSA envisions to constitute an overall architecture that facilitates data exchange and integration in one platform which is delivered to the end users as a service, supporting several ICT deployments in crops, livestock and forestry, regardless of their geographical location. This approach is aiming to leverage MFS and improve in economic, social and environmental indicators. Figure 1 illustrates the MiFarm-CSA view of MFS against the current state. The proposed architecture follows a layered approach since it offers a lot of benefits in comparison with a non-layered one. These benefits are summarized below:  
* Easier to understand: architecture will be easier to understand, not only for the architects who designed it, but also for the technicians who are going to build and maintain it and for the people who are going to participate in it. * Easier to test: having a layered architecture makes it possible to define independent components much better, which makes component testing easier. * Easier to extend: adding new features or changing current ones is easier in a layered architecture. In particular, the proposed architecture consists of four main layers:  
Integrated Data Collection Network: In detail, the Integrated Data Collection Network (IDCON) applies to the area of MFS, to monitor any type of crops; livestock and forestry; and climate and soil parameters. More specifically, this tier exploits a wide range of Internet of Things (IoT) sensors, devices, gateways and servers, UAVs and FANETs, which are capable of covering large-scale areas for providing big volumes of data in near real time, such as information about the temperature, humidity, pressure, wind speed, pH, dissolved oxygen levels, temperature, conductivity, etc. IDCON encloses four main tools, namely, the data capturing and recording system, which includes the smart sensing and tracking sensors, the aerial sensing systems and the weather and climate control systems; the energy management and harvesting system (EMHS); the semantic middleware and gateways (SMG); and cloud-based event and data analytics (CEDA) which includes the livestock farm management system and the cloud application. The Social-Ecological Conceptual Framework: The second layer concerns the MiFarm-CSA Social-Ecological Conceptual Framework (SECF) which aims to support sophisticated capabilities such as integrated farming to yield forecasts, and optimization of crop management in terms of fertilization, irrigation and sowing density, while at the same time  
Figure 1: MiFarm-CSA concept. providing social learning modules, in a user-friendly way, thinking skills, virtual scenarios, case studies and long-term predictions, estimations and business-oriented best practices based on the input received from the underlying MiFarm-CSA IDCON layer. The Mixed Farming as a Service: The top layer of the architecture is the Mixed Farming as a Service (MFaS) which provides a set of advanced and efficient user applications and services destined to farmers and stakeholders. More specifically, the MFa5 encloses eight main applications, namely: Resource Managers (ReMa), Integrated Irrigation and Fertilization Application (IFRA), Anomaly and Pest Detection Tool (APED), Novel Climate Service and Application (NCSA), Digital Market Radar (DiMaRa), Web-based Knowledge Exchange Service (W-KES) and Integrated Farming Systems Economics (IFSEC).