You are currently viewing a new version of our website. To view the old version click .
Applied Sciences
  • Article
  • Open Access

7 July 2020

A Smart Parking Solution Architecture Based on LoRaWAN and Kubernetes

,
,
,
,
,
and
1
Facultad de Ingeniería de Sistemas, Escuela Politécnica Nacional, Quito 170525, Ecuador
2
Smart Lab, Escuela Politécnica Nacional, Quito 170525, Ecuador
*
Author to whom correspondence should be addressed.
This article belongs to the Special Issue Internet of Things (IoT)

Abstract

Finding a parking space in a city is one of the most common activities of a driver. This becomes more difficult when the city is unknown or has huge vehicular congestion. A solution to address this issue is called smart parking. Smart parking solutions rely on Internet of Things (IoT) and several technologies to achieve their purpose. This paper proposes an architecture for deploying a smart parking solution based on Long-Range Wide Area Network (LoRaWAN) sensors, LoRaWAN and a cluster of Kubernetes. This approach provides an open architecture able to share information with other parties through a REST API interface. Likewise, it contains a mobile and a web application for user interaction. This solution provides an administration interface for managing parking lots. The user interface lets a user to find, view information, display available spaces and rate a parking lot in real time. This solution could be used as an application as service parking system. The proposed architecture is fully portable and scalable due to the use of Kubernetes.

1. Introduction

One of the most common activities of a driver in a city, is to find a parking space. Finding a parking space turns difficult when a driver is not familiar with the city or when the city has vehicular congestion. The activity of finding space is manual and demands time. An average of 30% of the vehicles on the street are looking for a parking spot and the time it takes is around 8 min in average [1]. In addition, a vehicle spends 10% of its time moving whilst the rest of the time it is stopped as mentioned in [2]. Smart parking solutions are useful because they help drivers to reduce fuel consumption, save time and money, reduce stress and increase safety as do not get distracted while finding a parking place [3].
There are several novel smart parking solutions with different architectures and ways of implementation as reviewed in [1]. However, these solutions have several limitations from the technological perspective that do not allow to have a comprehensive smart parking system. First, in terms of sensors, they are not specialized ones with specific-purpose (i.e., general sensors for Arduino, Raspberry or Espressif (ESP) boards). Additionally, communication protocols to collect data from sensors are not appropriate for handling small payloads within long distances. Some existing solutions do not emphasize on power-consumption which is required for most of Internet of Things (IoT) scenarios. Furthermore, previous solutions’ backend infrastructures are based on a virtual machine approaches or traditional dedicated server deployments. In addition, these solutions do not consider mechanisms for holding data for extended periods of time in case of failure. Moreover, even though high-availability is crucial in smart parking since it provide information in real-time, most of systems do not consider this requirement. Finally, integrating previous solutions to other systems is complex and demands more effort as they do not have standardized interfaces such as APIs.
One of the solutions that helps to solve the aforementioned problem is smart parking. Smart parking is one of the most remarkable use cases within smart cities context [4]. Smart parking solutions can reduce congestion, optimize parking time and reinforce traffic laws. Smart parking solutions leverage on the use of Internet of Things (IoT) technologies to expand and fulfill their purpose. IoT relies on technologies that support low energy consumption, profitability, low data rate and long-reach among others to deliver solutions that benefit humankind [5]. In this scenario, Low-Power Wide-Area Network (LPWAN) transmission technologies provide many benefits for smart parking solutions, such as wide coverage in rural and urban areas at low energy consumption. Among the LPWAN protocols, the most popular are: Narrowband IoT (NB-IoT), SigFox and LoRaWAN as stated in [5]. These protocols have similarities in terms of architecture but differ in other parameters such as frequency of operation, security and connection fees. Within LPWAN protocols, the most flexible and used protocol is LoRaWAN [6]. LoRaWAN is an open standard protocol which is the most attractive reason for being widely used. It is based on LoRa which works over Industrial Scientific and Medical (ISM) bands and does not require a connection fee like NB-IoT. Likewise, it does not require a third-party infrastructure (backend servers) for its deployment as occurs in SigFox [7].
In terms of architecture, there are several ways to deploy a smart parking solution. For instance, authors in [8] used Arduino boards as sensing infrastructure components. There are other solutions as [9] that focus on building their own sensors rather than deploying a specific purpose sensor as in [10]. This proposed solution suggests the use of specific type sensors to collect information at the sensing infrastructure layer. In terms of communications several works uses Wi-Fi for connecting sensors with backend infrastructure [11]. However, Wi-Fi connectivity consumes more power and does not cover long-range areas. Our solution uses LoRaWAN which is a low power consumption and long-range protocol. In terms of backend infrastructure, some smart parking solutions use open-source software elements such as Message Queuing Telemetry Transport (MQTT) for exchanging information [12] between sensors and the backend. Others like [13] uses a whole backend platform and only take care about sensors and communication protocols. In the proposed scenario we promote the use of open-source software by designing a cluster architecture to increase availability and scalability.
This work reviewed several deployments, proposed and built an architecture based on Libelium smart parking sensors, LoRaWAN and open-source technologies for the backend like a cluster of Kubernetes with MQTT and MongoDB. The proposed architecture has aimed to combine several technologies to develop a robust smart parking system from the perspectives of stability and availability of the service. This combination intends to provide high availability, scalability and portability to a smart parking system. Likewise, this architecture aims to provide a base guide for building this type of solutions by considering the use of specific purpose sensors, adequate low-power and long-range communication protocols and a clustered backend infrastructure. From the availability and stability perspective, other solutions do not provide redundancy over a clustered-environment. They do not use a messaging server (i.e., Rabbit) which can be a bottleneck. In addition, if the main server handling and processing the information fails, data from sensors would be lost. In comparison to other works, in the proposed architecture if the main server in charge of handling the information collected fails, all messages are accumulated in the messaging server for further processing. There is better performance based on the modularity of the system. The main contribution of this work is to provide a base architecture for building smart parking systems by considering all elements that could be easily connected by using several technology components.
The paper is structured as follows. Section 2 describes other work reviewed in this work. Section 3, describes a brief analysis of the previous works. Then, the Section 4 explains the proposed smart parking solution. Later, Section 5 presents the results gotten after the implementation of the proposed solution. After, Section 6 discusses strengths of the proposed solution, and finally, the present work is concluded in Section 7.

3. Analysis of Previous Works

3.1. Analysis of Works Based on Sensors

The reviewed propose several ways to deploy a smart parking solution. Some of them emphasize on the types of sensors that might be used for deploying such solution as in [24]. Meanwhile, there are others that do not use specific purpose sensors and they attach sensing modules to Arduino or similar devices. These microcontrollers do not have the same energy autonomy properties as specific purpose sensors. Moreover, these microcontrollers are not IP68 compliant which make them no suitable for adverse weather conditions. Sensors must be able to sense the presence of a vehicle no matter the weather. Therefore, sensors in a smart parking solution have to be able to work under severe weather conditions (i.e., rains, dust). Likewise, sensors should be able to transmit information over long-range perimeters with low energy consumption. These sensors should not be invasive as RFID, but effective when determining vehicle presence and avoid false-positive detections. Based on that, magnetic sensors are the ones that best fit the detection requirement and will be part of the proposed solution.

3.2. Analysis of Works That Emphasize Communication Protocols

While Wi-Fi, Bluetooth Low Energy (BLE) and Zigbee are appropriate for short distances (less than 500 m). Network connectivity must reach long distances. In real conditions, parking slots are bigger and cover hundreds of square meters particularly in places like hospitals, universities, schools, cities. LPWAN protocols are suitable for covering long-range distances at low power consumption. Protocols like SigFox, LoRaWAN or NB-IoT could be considered for implementing a smart parking solution. Due to its versatility and openness, LoRaWAN is suitable protocol for a smart parking solution as discussed in [14,16,20].

3.3. Analysis of Works That Focus on Backend Solutions

The reviewed papers propose several ways to deploy a smart parking solution. Some of them emphasize on the types of sensors that might be used for deploying such solution as in [24]. Meanwhile, there are others that do not use specific purpose sensors and they attach sensing modules to Arduino or similar devices. These microcontrollers do not have the same energy autonomy properties as specific purpose sensors. Moreover, these microcontrollers are not IP68 compliant which make them no suitable for adverse weather conditions. Sensors must be able to sense the presence of a vehicle no matter the weather. Therefore, sensors in a smart parking solution have to be able to work under severe weather conditions (i.e., rains, dust). Likewise, sensors should be able to transmit information over long-range perimeters with low energy consumption. These sensors should not be invasive as RFID, but effective when determining vehicle presence and avoid false-positive detections. Based on that, magnetic sensors are the ones that best fit the detection requirement and will be part of the proposed solution.
Wi-Fi, BLE and Zigbee are appropriate for short distances (less than 500 m). Network connectivity must reach long distances. In real conditions, parking slots are bigger and cover hundreds of square meters particularly in places like hospitals, universities, schools, cities. LPWAN protocols are suitable for covering long-range distances at low power consumption. Protocols like SigFox, LoRaWAN or NB-IoT could be considered for implementing a smart parking solution. Due to its versatility and openness, LoRaWAN is suitable protocol for a smart parking solution as discussed in [14,16,20].
In terms of messaging, some solutions agree that MQTT is a suitable protocol for moving information collected from sensors to a backend infrastructure as in [17]. However, such architecture proposes the use of a unique server with no redundancy for collecting information and then storing information in a database. In that scenario, data would be lost as sensors do not have a mechanism for queuing packets. Therefore, not considering a redundancy mechanism would compromise the availability of information for further processing to obtain a particular result.
Smart parking solutions are intended to serve thousands of users (citizens). The backend infrastructure is in charge of processing and sharing data with their different actors. These actors could be other systems, services or citizens. The number of actors is constantly growing and tend to be unlimited. An appropriate way to keep up with this growth is by using components that could grow at the same rate and that provide appropriate levels of availability. Although using one physical server per service involved is a best practice, it does not allow a high level of scalability and availability. This a technical and economic limitation that would considerably increase the cost of the final solution. An approach to address these issues is by clustering nodes involved and avoid using physical servers. Kubernetes are a feasible alternative to configure a cluster of every service involved (i.e., data storage, messaging, publishing) as every node has its own computational resources [23].

4. Proposed Solution

The proposed solution shown in Figure 2 aims to cover some of the limitations discussed in the previous section. This solution is comprised of three major components: sensing infrastructure, backend infrastructure and user interface. First, sensing infrastructure oversees collecting information in real-time of the state of a parking slot whether if it is busy or available using a long-range communication. Those information payloads are sent to the backend-infrastructure with the help of a MQTT server. Then, in the backend infrastructure, a software component (Raw Data Bridge) moves those payloads to a Message Queue (MQ) Server. In that instance, there are two other software components: one for parsing data and another for processing payloads before its storage. The parsing component will take raw payloads from a “in” queue of the MQ Server and then post it over a new “out” queue of that MQ Server. Later, the logic component takes the payloads posted over the out queue and store them into a NoSQL data repository for publishing over a REST API. Finally, the stored data is consumed by a set of microservices which are used by mobile and web applications.
Figure 2. Proposed solution architecture.

4.1. Environment Setup

The previous architecture was tested over a small parking lot of a university campus. The environment consisted of 10 sensors connected to a single MultiTech Conduit gateway through LoRaWAN protocol. The gateway was connected through MQTT protocol to a MQTT Server node, an MQ Server node and a DB Instance. All the previous devices were deployed and connected in an isolated Local Area Network within the university premises. The REST API was deployed for public consumption over a free domain.
Every node of the cluster has the following hardware capabilities as shown in the following table (see Table 2).
Table 2. Hardware resources per node.
To measure the performance of the system, response time tests were carried out when carrying out a series of transactions taking into account the proposed scenario (based on Kubernetes) and the one used by some implementations (based on virtual machines). The results obtained were then were plotted in charts to understand the behavior of the proposed solution and identify if there was potential impact on system performance. The results obtained during the tests are shown in the next section (see Section 5).

4.2. Sensing Infrastructure

As discussed before, sensing infrastructure should be able to communicate over kilometers as smart parking solutions are intended to cover wide areas. In this sense, the usage of LPWAN protocols/technologies such as LoRaWAN which allows to communicate over long-range distances with low power consumption could be suitable. The proposed solution has used LoRaWAN because of its openness which allows to the developer to implement all the components of its architecture which is composed of end-devices, gateway, network server and application server (see Figure 3). As an additional information, it is important to indicate that the proposed architecture is based on the specification 1.0.2 of LoRaWAN. The components within the architecture perform specific tasks. For example, smart parking sensors are in charge of sensing vehicle presence and passing such data to the gateway over LoRaWAN network. The gateway transforms LoRa payloads into TCP/IP packets which are delivered to the network and application servers.
Figure 3. Smart parking sensing infrastructure based on LoRaWAN.
For the implementation of the proposed solution, we have used sensors manufactured by Libelium which support SigFox and LoRaWAN protocols. These devices use magnetic sensors for detecting the presence of a car and they are IP68 compliant, which means that are dust-resistant and water-resistant (up to 1.5 m deep). Their operation frequency is rated between 863 MHz to 923 MHz which is an unlicensed ISM specter. For this implementation, the US902–918 MHz frequency was selected as recommended by the manufacturer according to the region of implementation. It is also important to indicate that these sensors hold a power autonomy of 4–6 years according to the manufacturer’s specifications.
On the other hand, the proposed solution used the MultiTech Conduit IP67 Base Station for implementing the LoRaWAN Gateway. It supports public and private LoRa network deployments working at 868 MHz and 915 MHz ISM bands, and it is designed for outdoor deployments. The main task performed by this device is to convert Radio Frequency (LoRa) packets into IP packets and vice versa; in other word, this device routes the uplink and downlink packets. An uplink packet is a packet sent from to the sensor to an application whilst a downlink packet is packet sent from an application to a sensor. The Gateway used in the proposed solution has a network server embedded. This server is in charge of routing uplink packets to the respective application server or route downlink packets to a particular sensor through the gateway. In addition, the Conduit Gateway is able to provide an application server to forward packets via MQTT protocol to a third-party application server.

Security within the Sensing Infrastructure

In terms of security, LoRaWAN supports two joining methods. Activation by Personalization (ABP) and Over The Air Activation (OTAA). For the present solution, the OTAA method was configured in the end-nodes, network and application server. For OTAA mode, the following parameters and keys have to be pre-configured and shared: DevEUI (Device Unique Identifier), AppEUI (Application Unique Identifier) and AppKey (Application Root Key). The LoRaWAN specification 1.0.2 specifies that the AppKey is an AES-128 bits key. This key is used to derive two other keys used to cipher the payloads. Those keys are AES-128 bits keys and are Network Session Key (NwkSKey) and Application Session Key (AppSKey). Each key is used by each server so that the Network Session Key (NwkSKey) is used between the end-device and the network server to validate the integrity of the messages (MIC fields). The AppSKey is used between the end-device and the application server to encrypt the payloads providing confidentiality [26].

4.3. Backend Infrastructure

This part of the solution is in charge of processing the information collected by the sensors. The backend was mainly built over a cluster of Kubernetes. Kubernetes is an open-source system that allows to automate the deployment of applications based on containers. In this solution, Kubernetes have been used to deploy database server, message queue server, MQTT server and the REST API. The proposed architecture is shown in Figure 4.
Figure 4. Smart parking solution backend-architecture.
The main point of entry is the MQTT Server which is based on Mosquito (an open-source MQTT broker). The information forwarded by the Network Server is collected through this server via MQTT protocol. MQTT protocol delivers a lightweight method to handle messaging over a publisher/subscriber model [27]. The information received by Mosquito comes in Javascript Object Notation (JSON) format as shown in Figure 5 and Figure 6. Mosquito server forwards unencrypted payloads to a software component called “Raw Data Bridge”.
Figure 5. JSON Payload sent by sensor node and forwarded by Mosquito.
Figure 6. JSON Payload generated by Mosquito MQTT.
The Raw Data Bridge takes the payload received from Mosquito and delivers it to an inbound message queue with a specific topic. The Raw Data Bridge acts as a producer that publishes messages to an Exchange. This exchange delivers messages to a queue based on the type of exchange (direct, topic and fanout). Based on that behavior, RabbitMQ Server (an open source message broker that natively supports AMQP protocol and others like MQTT, WebSocket, etc.) delivers messages to other exchanges that will be later consumed by the Parser and Logic components respectively. These components were built in C#. The Parser component, is a software program that transforms payloads received from the sensor to a lighter JSON format that will be later stored in a database repository. On the other hand, payloads processed by the Parser are then published to a new Exchange in the RabbitMQ Server, which will be later consumed in the Logic component. The Logic component is in charge of storing parsed information into a NoSQL repository (MongoDB was used in this implementation). MongoDB stores enriched information generated by the sensors. Finally, all the information stored in the database is exposed through an API REST running over IIS with ASP.NET Core.
The following versions were used in the proposed architecture RabbitMQ (Version 3.7.7) developed and maintained by VMWare located in Palo Alto, CA, United States, MongoDB (Version 4) developed and maintained by MongoDB Inc, located in New York City, NY, United States and Mosquitto (Versión 1.4.12) supported and maintained by Eclipse Foundation, located in Ottawa, Canada, for every particular component of the backend infrastructure detailed in Figure 4.

REST API

This system is intended to be integrated with any type of applications e.g., mobile or web; therefore, an API REST interface to expose several services that would be consumed by any other actor if required was implemented. This interface possesses a security feature to prevent unauthorized access implemented using Auth0 which is an authentication token platform. Authentication tokens are used to validate requests to the services. If an actor fails to provide such token, the service will return an HTTP 403 error (Forbidden). The API has been well documented with the aid of swagger UI which is an open source project to render API documentation in HTML [28]. Swagger (see Figure 7) helps developers to clearly understand the way to consume a particular service. It allows to specify HTTP verbs and parameters with particular format that need to be sent to consume a service.
Figure 7. REST API documented with swagger.

4.4. User Interface

Two types of applications were developed: one for end users and another for system administrators. The end user applications are composed of a mobile application for Android and a web application.
The main features created for the end users included in both mobile and web applications are viewing parking lots near the location of the user, displaying information about a parking lot (cost, opening hours, location) and rating a parking lot (see Figure 8).
Figure 8. Smart parking web user interface.
On the other hand, the main features created for system administrators includes: user management (add, update, delete), parking lot management (add, update, delete) including features related with parking sections, screens, RFID cards, parking levels, etc. (see Figure 9 and Figure 10).
Figure 9. Web administration interface list parking lots.
Figure 10. Web administration interface editing parking lots.

5. Results

In the following, some important achievements of the proposed solution are presented:
The inclusion of Kubernetes within this architecture helped to have several instances of services running at the same time with limited OS capabilities. Kubernetes allowed to focus on the implementation of the service itself rather than configuring the whole server and the operating system for developing high available infrastructure. This technology runs over Linux servers and its management is easy to handle. Using containers in this implementation provided flexibility and scalability without much technical effort and hardware resources. In addition, capabilities of Kubernetes allowed the proposed solution to become a “software as a service” solution since it delivers all the layers of the smart parking solution.
The following Figure 11 shows a comparative chart between the use of containers and virtual machines when deploying and RabbitMQ server. The chart shows one hundred tests and the time taken in collecting data sent from a sensor by a RabbitMQ consumer. The tests were performed by using a single sensor and one consumer, respectively. The orange line corresponds to the behavior of the RabbitMQ consumer over a container whilst the yellow line represents a consumer deployed over a virtual machine (VM). The average time taken to consume the information over a RabbitMQ container deployment borders 282 milliseconds whilst the average time of the same consumer over a VM borders 348 milliseconds which represents an increase of approximately 22%. This shows that the proposed approach in this paper is significantly better in terms of performance compared to a VM deployment. The architecture proposed helps to increase the performance of the solution.
Figure 11. Time taken to process RabbitMQ Consumer requests.
RabbitMQ fulfilled the purpose of having a centralized element to process payloads and take different actions depending on structures or content. The fact of publishing and subscribing into topics allowed to enrich raw data for further processing and storage into MongoDB.
Mosquitto acted as a pass-through bridge which was able to deliver all generated payloads from different sensors through the same gateway. At this point, there was no need to perform additional development to support such feature. The following chart (see Figure 12) denotes the time taken in milliseconds by the Mosquitto component to process a set of requests. The Kubernetes deployment took an average of 156 ms to process a hundred request whilst the VM version took an average of 155 ms to process the same number of requests. In both scenarios, the maximum amount of time taken was 172 ms. However, the minimum amount of time taken by the Kubernetes deployment was 149 ms whilst the VM scenario tool 146 ms, this scenario took 3 ms less. In terms of general performance, Mosquitto behaved very similar in both scenarios showing that performance was not degraded because of the Kubernetes deployment making it a feasible component that could be deployed over the proposed architecture.
Figure 12. Time taken to process Mosquitto requests.
MongoDB, a NoSQL database, allowed the generation of complex information structures. The selected structures for the proposed solution were JSON based documents which contains all the required information. These documents can handle several fields of information without performing complex queries between different tables (as in standard SQL databases). NoSQL repository did not degrade the performance of the solution.
Several tests were performed to measure the performance impact over MongoDB when performing several requests against the database. The chart in Figure 13 shows the performance of MongoDB in both deployment scenarios. 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.
Figure 13. Time taken to process MongoDB requests.
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 14. Time taken to write data in a NoSQL repository.
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. The proposed architecture intends to provide an easy deployable smart parking as service system.
Second, from the software components perspective, the proposed solution has a more global conception compared to reviewed works, since it includes several components required for managing a parking place. The components of the system address different needs such as management, usability and integration. First, the proposed approach provides the ability to manage several parking places at once by using the administration software. The person in charge of management can use a web-based management interface to configure several spots, levels, parking monitors or parking places. There is a software module in place to manage and configure parking screens. In addition, there is a software module for handling and registering users and parking managers. This solution also provides a module so that end-users can locate, get information and rate parking places through a mobile or a web application. The most important feature of the proposed solution in contrast to reviewed works is that it provides a REST API which is a best practice for integrating our whole backend infrastructure to any mobile or web application. It is also important to indicate that we documented all services with Swagger which helped to build a comprehensive documentation, so that any developer can integrate or build customized client interfaces.

6. Discussion

People looking for a parking spot is a source of traffic and air pollution, because of the additional time and fuel people must spend until they find an available spot. A solution for this problem is a smart parking system that comprises deploying sensors on parking lots, processing the retrieved data and making the information available for people looking for a parking spot. Several smart parking solutions are proposed with completely different architectures and technologies. With the aim of improving the existing solutions, a new architecture is proposed using state of the art technologies and solve the parking search problem.
The solution proposed in this paper manages information through a message broker, this is a crucial part of the infrastructure since it reduces the processing load to the rest of the system. Another advantage of using a message broker is sending only the necessary information to the rest of the system. This prevents the inclusion of unnecessary data generated by most communication protocols. In this solution it is only required to know whether a slot is empty or occupied.
From the results obtained in the previous section, graphs have been generated from the previous results that show the behavior of our components based on Kubernetes vs. deployments in VMs. These tables show the maximum, average and minimum times obtained during the test rounds.
Frist of all, the entry point of our proposed architecture is the Mosquitto Server. This component is in charge of collecting payloads received from the gateway. From the test performed, we figured out that this particular component could worked very similar on both deployment scenarios. Mosquitto is 1 ms in average slower in the Kubernetes deployment; however, this is not as significant as expected since it represents 1% approximately. Anyhow, this component could be tuned up to improve the response times and probably that time could be reduced. In the proposed scenario this component showed a good performance for being the entry point of the data. The results summarized for this component are shown in Figure 15.
Figure 15. Mosquitto Kubernetes vs. virtual machine (VM) summarized times.
Another important component of the backend infrastructure is the Rabbit MQ server. Their main tasks are to collect raw payloads, enrich them and let them ready to be stored in the NoSQL repository. From the results obtained (see Figure 16), it could be clearly seen that the component in our approach has a considerable better performance than the approach based on VM deployment. The inclusion of this component in Kubernetes environment has shown that our approach is in average approximately 22% faster than the VM approach. Considering that this component will have to process data several times, it is important to have good response times to prevent delays in the delivery of information. These results show that Rabbit MQ performs much better in this environment in spite of having less hardware resources than a virtual machine. Therefore, the proposed approach improves the performance of the system.
Figure 16. Rabbit MQ Kubernetes vs. VM summarized times.
Finally, the last component of our backend infrastructure is the NoSQL repository which will store all the enriched payloads delivered by Rabbit MQ. From the results shown in Figure 17, it could be seen that the deployment based on Kubernetes if faster in terms of response time, it is in average 10.5% better than the VM approach. Considering that the repository will have to provide and store information at the same time, the obtained response time is very adequate and would help to have a better performance in general. Anyhow, the times obtained within the VM approach are not bad at all and could work for a basic implementation. However, the approach proposed in this architecture could work for medium or complex systems.
Figure 17. MongoDB Kubernetes vs. VM summarized times.
The use of Kubernetes, has helped to resource the amount of resources required to deploy an instance of a particular component. In addition, it has provided flexibility at the moment of deploying additional images of the same component as every new node is based on a previous tested and working image. From the experience of the team, we spent less time generating docker images than VMs for every particular component, it could be said that it reduced our work in at least 60%. Finally, the use of Kubernetes to deploy nodes with the “required and necessary” elements to work rather than installing a whole VM with its OS from scratch. The node deployment schema offered by the Kubernetes approach is very useful when escalating solutions as it is easier and faster.

7. Conclusions

This work presents the implementation of a smart parking architecture that solves some of the problems of today’s big city. A series of applications is provided to the end user to accelerate the parking process of their vehicle in a convenient location. Additionally, it is important to indicate this work has shown how LoRaWAN is very useful for implementing smart parking solutions since allows sensing and communicating the state of a parking slots within long-range distances using low amount of energy. Moreover, this work also has tested and verified that Kubernetes and open-source platforms are suitable for building smart parking solution as software as a service since they deliver scalability and availability features without performing complicated configuration tasks.
Finally, it is important to indicate that some of the benefits of implementing smart parking solutions are reduction of the search time for available parking spaces, reduction of fuel consumption by the vehicles, reduction of carbon emissions of the vehicles and reduction of vehicular traffic in urban areas.

Author Contributions

Conceptualization, S.G.Y. and J.J.B.; data curation, J.S. and J.L.; funding acquisition, S.G.Y.; investigation, J.S., J.G., J.L., A.U., D.P., J.J.B., S.G.Y.; methodology, J.J.B. and S.G.Y.; project administration, S.G.Y.; resources, S.G.Y. and J.J.B.; supervision, J.J.B. and S.G.Y.; visualization, J.S., J.L., A.U., D.P.; writing—original draft preparation, J.S., J.L., A.U., D.P., J.G., J.J.B.; writing—review and editing, J.J.B., S.G.Y., J.S.; All authors have read and agreed to the published version of the manuscript.

Funding

The authors gratefully acknowledge the financial support provided by the Escuela Politécnica Nacional, for the development of the project PIJ-17-08 — “Diseño e implementación de un Sistema de parqueadero inteligente”.

Acknowledgments

The authors gratefully acknowledge the financial support provided by the Escuela Politécnica Nacional, for the development of the project PIJ-17-08 — “Diseño e implementación de un Sistema de parqueadero inteligente”.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Barriga, J.J.; Sulca, J.; Luis, J.L.; Ulloa, A.; Portero, D.; Andrade, R.; Guun, S.Y. Smart parking: A literature review from the technological perspective. Appl. Sci. 2019, 9, 4569. [Google Scholar] [CrossRef]
  2. Thinking Highways. Smart parking in the thinking city. Think. Cities 2016, 3, 1–15. [Google Scholar]
  3. Lin, T.; Rivano, H.; Le Mouel, F. A survey of smart parking solutions. IEEE Trans. Intell. Transp. Syst. 2017, 18, 3229–3253. [Google Scholar] [CrossRef]
  4. Emc, D. Smart Cities and Communities GDT Smart City Solutions on Intel®-based Dell EMC infrastructure; Dell EMC Infrastructure: Hopkinton, MA, USA, 2017. [Google Scholar]
  5. Mekki, K.; Bajic, E.; Chaxel, F.; Meyer, F. A comparative study of LPWAN technologies for large-scale IoT deployment. ICT Express 2019, 5, 1–7. [Google Scholar] [CrossRef]
  6. Sandoval, R.M.; Garcia-Sanchez, A.J.; Garcia-Haro, J. Performance optimization of LoRa nodes for the future smart city/industry. Eurasip J. Wirel. Commun. Netw. 2019, 2019. [Google Scholar] [CrossRef]
  7. Internet, F.; Access, W.; View, C.; Payments, S.M.; View, N.F.C.; Ert, M.A. A survey on LoRaWAN architecture, protocol and technologies. Future Internet 2019, 216. [Google Scholar] [CrossRef]
  8. Gupta, A.; Kulkarni, S.; Jathar, V.; Sharma, V.; Jain, N. Smart car parking management system using IoT. Am. J. Sci. Eng. Technol. 2017, 2, 112–119. [Google Scholar]
  9. Gopal, D.G.; Jerlin, M.A.; Abirami, M. A smart parking system using IoT. World Rev. Entrep. Manag. Sustain. Dev. 2019, 15, 335–345. [Google Scholar] [CrossRef]
  10. Vieira, A.; Rosa, I.; Santos, I.; Paulo, T.; Costa, N.; Maximiano, M.; Reis, C.I. Smart campus parking–parking made easy. In Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2019; Volume 11540, pp. 70–83. [Google Scholar]
  11. Sadhukhan, P. An IoT-based E-parking system for smart cities. In Proceedings of the 2017 International Conference on Advances in Computing, Communications and Informatics, ICACCI 2017, Udupi, India, 13–16 September 2017; pp. 1062–1066. [Google Scholar]
  12. Alqazzaz, A.; Aloufi, E.; Alharthi, R.; Zohdy, M.A.; Alrashdi, I.; Ming, H. A practical evaluation of a secure and energy-efficient smart parking system using the MQTT protocol. ICISDM 2019, 165–170. [Google Scholar] [CrossRef]
  13. Rocha, A.; Souza, A.; Johnathan, D.; Aquino, G.; Queiroz, R.; Melo, M. Evaluating thingspeak as an IoT event platform on buildinga smart parking application. In Proceedings of the XI Simpósio Brasileiro de Computação Ubíqua e Pervasiva, Porto Alegre, Brasil, 16–18 July 2019. [Google Scholar]
  14. Sotres, P.; la Torre, C.L.D.; Sanchez, L.; Jeong, S.; Kim, J. Smart city services over a global interoperable internet-of-things system: The smart parking case. In Proceedings of the 2018 Global Internet of Things Summit (GIoTS), Bilbao, Spain, 4–7 June 2018. [Google Scholar]
  15. Khanna, A.; Anand, R. IoT based smart parking system. In Proceedings of the 2016 International Conference on Internet of Things and Applications, IOTA, Pune, India, 22–24 January 2016; pp. 266–270. [Google Scholar]
  16. A’Ssri, S.A.; Zaman, F.H.K.; Mubdi, S. The efficient parking bay allocation and management system using LoRaWAN. In Proceedings of the 2017 IEEE 8th Control and System Graduate Research Colloquium, ICSGRC, Shah Alam, Malaysia, 4–5 August 2017; pp. 127–131. [Google Scholar]
  17. Swamy, N.; Satyanarayana, S.; Babu S, L.; Sharma, T. Design and implementation of a smart parking system using IoT technology. Int. J. Eng. Res. Comput. Sci. Eng. 2018, 6. [Google Scholar]
  18. Cai, W.; Zhang, D.; Pan, Y. Implementation of smart parking guidance system based on parking lots sensors networks. In Proceedings of the 2015 IEEE 16th International Conference on Communication Technology (ICCT), Hangzhou, China, 18–20 October 2015; pp. 419–424. [Google Scholar]
  19. Suryady, Z.; Sinniah, G.R.; Haseeb, S.; Siddique, M.T.; Ezani, M.F.M. Rapid development of smart parking system with cloud-based platforms. In Proceedings of the 5th International Conference on Information and Communication Technology for The Muslim World (ICT4M), Kuching, Malaysia, 17–18 November 2014. [Google Scholar]
  20. Alam, M.; Moroni, D.; Pieri, G.; Tampucci, M.; Gomes, M.; Fonseca, J.; Ferreira, J.C. Real-time smart parking systems integration in distributed ITS for smart cities. J. Adv. Transp. 2018, 2018, 1–13. [Google Scholar] [CrossRef]
  21. Mainetti, L.; Palano, L.; Patrono, L.; Stefanizzi, M.L.; Vergallo, R. Integration of RFID and WSN technologies in a Smart Parking System. In Proceedings of the 2014 22nd International Conference on Software, Telecommunications and Computer Networks (SoftCOM), Split, Croatia, 17–19 September 2014; pp. 104–110. [Google Scholar]
  22. Tsiropoulou, E.E.; Baras, J.S.; Papavassiliou, S.; Sinha, S. RFID-based smart parking management system. Cyber Phys. Syst. 2017, 3, 22–41. [Google Scholar] [CrossRef]
  23. Hamed, M.M.; Latiff, L.A.; Kamil, I.A.; Dziyauddin, R.A.; Kaidi, H.M. Design and implementation of sensing infrastructure for an indoor smart parking system. In Proceedings of the 2018 2nd International Conference on Telematics and Future Generation Networks (TAFGEN), Kuching, Malaysia, 24–26 July 2018; pp. 31–36. [Google Scholar]
  24. Grodi, R.; Rawat, D.B.; Rios-Gutierrez, F. Smart parking: Parking occupancy monitoring and visualization system for smart cities. In Proceedings of the SoutheastCon 2016, Norfolk, VA, USA, 30 March–3 April 2016. [Google Scholar]
  25. Baroffio, L.; Bondi, L.; Cesana, M.; Redondi, A.E.; Tagliasacchi, M. A visual sensor network for parking lot occupancy detection in Smart Cities. In Proceedings of the 2015 IEEE 2nd World Forum on Internet of Things (WF-IoT), Milan, Italy, 14–16 December 2015; pp. 745–750. [Google Scholar]
  26. LoRa Alliance. LoRaWANTM 1.0.2 Regional Parameters; LoRa Alliance: Fremont, CA, USA, 2017. [Google Scholar]
  27. Eclipse Mosquitto. Available online: https://mosquitto.org/ (accessed on 31 December 2019).
  28. Download Swagger UI|Swagger. Available online: https://swagger.io/tools/swagger-ui/download/ (accessed on 31 December 2019).

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.