Skip to main content

Perfomance Evaluation of Java, JavaScript and PHP Serialization Libraries for XML, JSON and Binary Formats

  • Conference paper
  • First Online:
Book cover Services Computing – SCC 2018 (SCC 2018)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 10969))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Nurseitov, N., Paulson, M., Reynolds, R., Izurieta, C.: Comparison of JSON and XML data interchange formats: a case study. CAINE 9, 157–162 (2009)

    Google Scholar 

  2. Pragmateek: JSON vs XML: some hard numbers about verbosity (2013). http://pragmateek.com/json-vs-xml-some-hard-numbers-about-verbosity/

  3. 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

    Google Scholar 

  4. Renaud, F.: Benchmark of Java JSON libraries (2017). https://github.com/fabienrenaud/java-json-benchmark

  5. Smith, E., et al.: Benchmark comparing serialization libraries on the JVM (2017). https://github.com/eishay/jvm-serializers

  6. 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

    Google Scholar 

  7. 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

    Google Scholar 

  8. 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)

    Google Scholar 

  9. 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

  10. Sági-Kazár, M.: PHP serialization benchmarks (2017). https://github.com/sagikazarmark/php-serialization-bench

  11. Monsch, M.: Benchmarks (2017). https://github.com/mtth/avsc/wiki/Benchmarks

  12. 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

    Google Scholar 

  13. Maeda, K.: Comparative survey of object serialization techniques and the programming supports. J. Commun. Comput. 9(8), 920–928 (2012)

    Google Scholar 

  14. Richardson, L., Ruby, S.: Restful Web Services, 1st edn. O’Reilly, Sebastopol (2007)

    Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Pavel Kriz .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer International Publishing AG, part of Springer Nature

About this paper

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics