# Multi-Agent Dynamic Fog Service Placement Approach
## 5 Results
Default configuration values are used such as an RSA asymmetric algorithm and a 512-bit key size for public and private keys. As the chart above in Figure 18 suggests, four experiments with different security configurations were performed. It includes (a) no security package, (b) signed, (c) encrypted, and (d) signed and encrypted security levels. A PC was used as a high-resource fog node and services had to be moved from one fog node to another due to a low battery level. Such a remote service redistribution did not demonstrate any significant response time variation because of different security approaches. There is a slight response time increase mainly due to a battery level sensing time increase. When a low-resource fog node is used such as Raspberry Pi 4, the response time increases by almost 10 times, as is observed in Figure 19 above. It increases mainly by an impact of the placement finding algorithm, which is mostly resource prone as was witnessed in the publication [54]. The usage of a security package does not seem to have any significant impact, apparently because of no communication between agents. The response time may increase slightly in redistribution and battery level sensing during their turn, as these processes involve a sensed state communication to a Decision Maker and the communication of a decision made by a Decision Maker to Execution agents and finally Synchronization agents. Figure 18: Security package impact on communication in high-resource nodes. In order to increase a security level, security parameters can be adjusted instead of using default ones. This can be achieved by launching addition services. The following experiment is meant to test the impact of a key size on the response time. The same scenario of remote service redistribution due to a low battery is used. Raspberry Pi 4 and a PC were used as two different fog nodes. Three different key length configurations were used with each fog node. The service jade.security.AsymKeySize has to be launched and the key length options are 512, 1024, and 2048. As it is visible in Figure 20, the size for public and private keys did not have any significant impact on agent communication performance. There might be some slight increase in time due to procedures that involve more communication of agents, as in redistribution and battery level sensing, but the biggest impact is made by the placement finding method. Messages can be intercepted and read if they are exchanged as plain text. Therefore, additional measures to encrypt them are beneficial. The following experiment is meant to test the impact of a message encryption algorithm on the response time. The same scenario of remote service redistribution due to a low battery is used with Raspberry Pi 4 and a PC as two different fog nodes. Four different symmetric algorithm configurations were used for messages with each fog node. The service jade.security.SymAlgorithm has to be launched and the chosen options were AES, Blowfish, DES, and TripleDES. More details are available in Figure 21.  
Figure 19: Security package impact on communication in low-resource nodes. Figure 20: Response time dependency on an asymmetric key size. As is visible from the chart above, a message encryption algorithm did not have any significant impact. One of potential reasons might be the messages themselves that are being communicated, since they are very short. Short messages might not be resource demanding. Long messages would give a better idea, but these are simple agent communication commands and no increase in their length is needed. The following experiment is meant to test the impact of a key pair algorithm on the response time. Two different asymmetric algorithm configurations were used to generate key pairs with each fog node. The service jade.security.AsymAlgorithm has to be launched and the options to choose from are RSA, which is the default one, and DSA. More details are available in Figure 22 below.