# Security Architecture for Swarms of Autonomous Vehicles in Smart Farming
## 3 Results  
### Architecture Design for Swarms of Autonomous Vehicles  
Below, a proposal for a communication architecture is provided, the goal of which is to guarantee the real-time requirements of a swarm of autonomous vehicles. This type of system is composed of a set of core components, as depicted in Figure 1. First, a Mission Console, where the operator can define the missions to be executed by the swarm of vehicles, e.g., surveillance of an area, collects observations from short-range sensors that lack an internet connection, ploughing a field or applying prescription maps. The MissionConsole is usually a web or mobile application, accessible via HTTP, that can be standalone or integrated into the FMIS (Farm Management Information System). It sends the missions to the vehicles through a middleware, responsible for unifying and hiding the underlying heterogeneity of the hardware layer.  
The middleware can be deployed in the Cloud or at the Edge. The authors of this study propose a Cloud approach, especially for small and medium farms, to take advantage of the benefits of Cloud computing including reduction of IT costs, data and systems protection, quick deployment of services, access to automatic updates, backup of data, reliability and ubiquitous access. Moreover, deploying the middleware in a pay-per-use Cloud platform such as AWS has the advantage that this type of Cloud platform implements cyber security and threat detection services that continuously monitor and protect deployments [26].  
The middleware includes two components: the SWARM Controller and the Data Repository. The SWARM Controller component is in charge of managing real-time communications with the autonomous vehicles both to send the missions and to gather the feedback or status from the vehicles. The authors of this study recommend using a distributed publish/subscribe interface based on the OMG standard DDS in the communications among vehicles and with the SWARM Controller. The reasons for this decision are described in Section 2.2.2. On the other hand, the SWARM Controller provides a REST interface for communications with the Mission Console.  
The Data Repository stores all of the data exchanged by the system. It usually consists of relational (e.g., MySQL [27]) and NoSQL databases (e.g., MongoDB [28]) that can be hosted in the Cloud, and the data can be accessed through REST APIs.  
In REST services, HTTP requests made to the URI (Universal Resource Identifier) of a resource generate a response with a payload that can be formatted as plain text, in JSON (JavaScript Object Notation) or in XML (Extensible Markup Language) format. JSON is recommended for lightweight, faster communications and to reduce costs when transferring bytes over the network.  
Finally, we have the farming autonomous or unmanned vehicles where we can consider tractors with their equipment and implements; harvesters that help to harvest crops efficiently; ATVs (All-terrain Vehicles) that are smaller than tractors and can move across rough terrain; UGVs, which are mobile robots equipped with technologies for positioning, navigation, planning, sensing and actuating; and aerial vehicles such as drones or UAVs.