Abstract
The aim of this paper is to compare the formats and libraries used for serialization and deserialization of data, typically with RESTful web services, in terms of the processing time and size of the output data. The formats tested include XML, JSON, MessagePack, Avro, Protocol Buffers, and native serialization of each of the tested programming languages. Serialization and deserialization is tested in PHP, Java and JavaScript using 49 different official and third party libraries. The benchmark is fully open-sourced and automated, thus easily repeatable and extensible. The testing environment is designed to be isolated from the rest of the operating system using Docker containers having zero performance penalty in contrast to virtualization. The results show huge differences in processing time among libraries. Considering the output data size, binary formats with predefined schema, such as Avro and Protocol Buffers, provide the best efficiency.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Nurseitov, N., Paulson, M., Reynolds, R., Izurieta, C.: Comparison of JSON and XML data interchange formats: a case study. CAINE 9, 157–162 (2009)
Pragmateek: JSON vs XML: some hard numbers about verbosity (2013). http://pragmateek.com/json-vs-xml-some-hard-numbers-about-verbosity/
Wang, G.: Improving data transmission in web applications via the translation between XML and JSON. In: 2011 Third International Conference on Communications and Mobile Computing, pp. 182–185, April 2011
Renaud, F.: Benchmark of Java JSON libraries (2017). https://github.com/fabienrenaud/java-json-benchmark
Smith, E., et al.: Benchmark comparing serialization libraries on the JVM (2017). https://github.com/eishay/jvm-serializers
Maeda, K.: Performance evaluation of object serialization libraries in XML, JSON and binary formats. In: 2012 Second International Conference on Digital Information and Communication Technology and it’s Applications (DICTAP), pp. 177–182, May 2012
Aihkisalo, T., Paaso, T.: A performance comparison of web service object marshalling and unmarshalling solutions. In: 2011 IEEE World Congress on Services, pp. 122–129, July 2011
Sumaray, A., Makki, S.K.: A comparison of data serialization formats for optimal efficiency on a mobile platform. In: Proceedings of the 6th International Conference on Ubiquitous Information Management and Communication, ICUIMC 2012, pp. 48:1–48:6. ACM, New York (2012)
Suarez, T.N.: Benchmarking BSON, JSON, and native serializing in PHP (2016). https://coderwall.com/p/ccdryg/benchmarking-bson-json-and-native-serializing-in-php
Sági-Kazár, M.: PHP serialization benchmarks (2017). https://github.com/sagikazarmark/php-serialization-bench
Monsch, M.: Benchmarks (2017). https://github.com/mtth/avsc/wiki/Benchmarks
Popić, S., Pezer, D., Mrazovac, B., Teslić, N.: Performance evaluation of using protocol buffers in the Internet of Things communication. In: 2016 International Conference on Smart Systems and Technologies (SST), pp. 261–265, October 2016
Maeda, K.: Comparative survey of object serialization techniques and the programming supports. J. Commun. Comput. 9(8), 920–928 (2012)
Richardson, L., Ruby, S.: Restful Web Services, 1st edn. O’Reilly, Sebastopol (2007)
Acknowledgements
The authors of this paper would like to thank Tereza Krizova for proofreading. This work and the contribution were also supported by a project of Students Grant Agency—FIM, University of Hradec Kralove, Czech Republic. Jan Vanura is a student member of the research team. The author would like to thank Jan Budina, a Ph.D. student at the University of Hradec Kralove, for testing and technical support.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2018 Springer International Publishing AG, part of Springer Nature
About this paper
Cite this paper
Vanura, J., Kriz, P. (2018). Perfomance Evaluation of Java, JavaScript and PHP Serialization Libraries for XML, JSON and Binary Formats. In: Ferreira, J., Spanoudakis, G., Ma, Y., Zhang, LJ. (eds) Services Computing – SCC 2018. SCC 2018. Lecture Notes in Computer Science(), vol 10969. Springer, Cham. https://doi.org/10.1007/978-3-319-94376-3_11
Download citation
DOI: https://doi.org/10.1007/978-3-319-94376-3_11
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-94375-6
Online ISBN: 978-3-319-94376-3
eBook Packages: Computer ScienceComputer Science (R0)