# A Smart Parking Solution Architecture Based on LoRaWAN and Kubernetes
## 5 Results
First of all, the orange line shows the behavior in a Kubernetes scenario where the average time to process a request was 0.51 ms, the maximum time was 0.78 ms and the minimum was 0.43 ms. On the other hand, regarding the VM deployment the average time showed 0.57 ms, the maximum was 0.93 and the minimum was 0.48 ms. With these results, it could be said that the Kubernetes deployment is 10.5% faster than the VM deployment. Thereby, this difference helps to ratify that the inclusion of this component in the architecture with the Kubernetes deployment scenario, improves the performance of the system. The following chart (see Figure 14) shows the time taken to process information generated by the sensor and written it into MongoDB repository. As shown, the inclusion of an MQTT server and a RabbitMQ server did not degrade the performance of the solution. According to the chart, the average time borders 5 milliseconds which is an appropriate time for real-time solutions. This chart is not considering the reporting time pre-configured in the sensor which has been established in 1 min by default; anyhow, every minute information would be processed and ready to be consumed in less than one second. These tests were performed with one sensor. The whole solution initially considers 10 sensors sensing and sending information every minute, if all sensors transmit at the same time, the maximum delay that the system would experiment would be about 1 s which is still a proper time for a real-time solution. Figure 13: Time taken to process MongoDB requests. The proposed solution provides several useful features compared to previous solutions which can be divided from two perspectives. First, from the functional perspective, the proposed solution provides useful features such as wireless vehicle detection which uses specific purpose sensors to sense a vehicle. In addition, including an IoT protocol (LoRaWAN) for transmitting information, the proposed solution allows to reduce power consumption and cover larger areas, in contrast to other works that have used short-range protocols for transmitting small payloads of data. The proposed solution does not require installing tags in vehicles to detect slot occupancy. Our solution uses RFID as an additional security mechanism for sites such as housing complexes or buildings where users have to verify their identity before leaving the parking site. In addition, the proposed solution can easily escalate since it has implemented a messaging server to keep generated data by the sensors; if there is an increase of messages, these servers can increase its capacity either to keep or process more data at the same time without affecting system's performance. Likewise, the inclusion of Kubernetes allows the proposed solution to increase its capacity without affecting the overall performance. Kubernetes are containers with reduced OS functionalities used only to deploy a particular service or set of services. Using Kubernetes in the proposed architecture, the proposed system allowed to build and deploy a cluster of services with high availability making the proposed solution fault tolerant. Compared to traditional virtualization, containers have the flexibility to build an image once and deploy it as many times as required. From the reviewed works, other solutions suggested the use of traditional virtualization which demands more resources and they are tied to an installed OS to deploy the service. In terms of security when deploying Kubernetes container, it is easy to detect vulnerabilities and patch them during the building process rather than waiting for the deployment process. The proposed infrastructure is deployable to any cloud service provider (i.e., Google Cloud, AWS, IBM Cloud, etc. ), and it does not depend on a particular OS or hardware infrastructure. Its level of flexibility, in terms of deployment is bigger than the reviewed works. The proposed architecture is modular compared to reviewed works and it does not depend on a sensor, software or hardware component.