# A Smart Decision System for Digital Farming
## 5 Web Platform View
#### Testing Scenario  
In this section, the performance results will be explained at the level of erroneous data, in the sensor environments, and in the traffic generated for two different transmission scenarios. The network server analysis, another important aspect, shows the server bandwidth. A real scenario was simulated with virtual users where they pretended to be farmers in action, making queries and publications in their virtual profiles to check the server response capacity, in which a query was analyzed and the data were simultaneously fed into the database and the connections. The results were very positive, with low usage of system capacity. Figure 8 shows a sample of the server test. On the first graphs, the number of queries appear, and a login action test period with several database queries. Figure 9 shows a sample of the server test. The graph shows that the number of connections to DB is in a period of login action. Network traffic can be displayed, as shown in Figure 10. The insert process starts when PLATEM adds the user as new friend, and a request can then be sent to the user. The capture generated by Wireshark of the server bandwidth and response time test during user posting of an uploaded image on the social network can be seen in Figure 11. This scenario implies the dedication of network server resources at a high level. Optimal performance of this task is the key to the proper functioning of the system. It is possible to analyze user queries and server data responses, where the length of each package is marked with the server response time. It may be the case that the data are images or big data sets. The server was capable of facilitating basic navigation for many users on the multimedia platform where many sender packets are ACKs, but server communications were congested when responding to big data, such as images, tables of historical data, and some user posts. The network analysis was based on uploaded messages with image posting, and the server network had to allocate additional resources for uploading and saving images. Figure 8: Database access analysis of query actions. Figure 7: My Friends list. Figure 11: Network analysis, server traffic. Figure 10: Network traffic in the test scenario. Figure 9: Connections to DB by processes. Additionally, through the platform, we can collect data from sensors placed in the field, such as temperature (see Figure 12) or wind speed (see Figure 13). Figures 12 and 13 show the average temperature per day (in \({}^{\circ}\)C) and average wind speed per day (in m/s), respectively, measured over 10 months. These values are used to calculate the irrigation needs. An example of the rules implementation on the server is given to solve a problem involving nitrogen application with an irrigation system. The dosages can be tuned with a nitrogen adjustment rule, e.g., as shown in Figure 14, in this case a PossibleFertiEvent rule that is capable of detecting the potentially low vegetation index in one part of a field, labelled area 1. The rule conditions determine when the action has to be implemented. In this example, two events must occur: manual user upload of the index calculation data of the field, with an NDVI level lower than 0.42, and pressure sensor detection of an operational irrigation system ready to begin fertilization. These real-life events are mapped to events in the system, dependent on LowNDVI and WaterPressureEvent. When all the conditions are fulfilled, the new event can be created. The last line of the actions section inserts this event in the rule engine. In this way, the new event can be used by other rules. Rules give great flexibility to the user to combine low level events and higher-level events, which should trigger proper services and generate user notifications. Drools Guvnor rule management tools provide a user-friendly interface for building rules so the user does not have to know all the language details, e.g., possible Low level on Vegetation Index detected in Aerial Mapping Data changes.