# PSON: A Serialization Format for IoT Sensor Networks
## 6 Conclusions and Future Work  
We are witnessing the emergence of a new generation of IoT devices capable of being part of massively scalable and cost-effective IoT applications using LPWAN and the latest NB-IoT and LTE-M communication technologies. The deployment of massive IoT applications requires an huge volume of low-cost, low-power sensor devices. Therefore, these sensor devices will have relatively low performance requirements.  
Figure 7: Protocol encoding sizes.  
In an IoT environment, clients and servers exchange data. Part of this data may be in the transport protocol, which is used in the exchange of messages. Within messages, structured information (integers of different sizes and formats, arrays, strings, etc.) can be exchanged. Therefore, the use of serialization formats is necessary to represent this structured data in a linear set of bytes, which can be equivalently deserialized. The process of serialization and deserialization is critical in massive IoT environments, as it consumes processing time and has an impact on message size, and consequently, it is directly related to the energy consumption of sensor devices and their lifetime. This paper presents a new serialization format used by the Thinger.io platform called PSON. PSON optimizes execution time, channel utilization, and power consumption compared to the most common methods used in IoT environments.  
In order to evaluate the efficiency of PSON, tests were carried out to compare it with the most widely used serialization formats using different payloads. The evaluation results demonstrate the excellent performance of PSON in terms of serialization, deserialization, and average encoding sizes. Specifically, the serialization and deserialization times for 1000 iterations were 11,179 \(\upmu\)s and 11,657 \(\upmu\)s for ESP32 and 125,671 \(\upmu\)s and 324,406 \(\upmu\)s for Arduino UNO; the average encoding binary size was 66.3 bytes. PSON also presented good results for library binary size overhead.  
Future works will involve extending this research to other IoT services, such as the performance impact in mesh and low-bandwidth networks and the energy savings for microcontrollers. Moreover, the intention is to register the encoding format within IANA (Internet Assigned Numbers Authority) so that PSON can become a new standard in the future for optimizing JSON payloads over the Internet. There is also an opportunity to improve PSON libraries by reducing the compile size in microcontrollers, thus increasing the efficiency in constrained devices. In addition, there is a plan to create libraries in different languages, such as Python, Node.JS, and Java, so the encoding format can be much more operable with different programming languages and custom back-ends. Finally, the improvement of libraries is planned with the use of zero-copy techniques [42] to avoid unnecessary memory copying to improve deserialization time.  
Conceptualization, M.A.P., A.L. and J.J.C.-G.; Formal analysis, A.L. and P.C.; Software, A.L. and P.C.; Supervision, M.A.P.; Writing--original draft, A.L., M.A.P. and J.J.C.-G.; Writing--review & editing, M.A.P., A.L., P.C. and J.J.C.-G. All authors have read and agreed to the published version of the manuscript.  
This work was funded by public research projects of the Spanish Ministry of Economy and Competitivity (MINECO) (MINECO), references TEC2017-88048-C2-2-R, RTC-2016-5595-2, RTC-2016-5191-8, and RTC-2016-5059-8, and the Madrid Government (Comunidad de Madrid-Spain) under the Multiannual Agreement with UC3M in the line of Excellence of University Professors (EPUC3M17) in the context of the V PRICIT (Regional Programme of Research and Technological Innovation) and the CDTI (Centro para el Desarrollo Tecnologico Industrial E.P.E.), CNU/1308/2018, 28 November.  
Not applicable.  
The authors declare no conflict of interest.