Performance

Different serialization formats have different characteristics in terms of serialization/deserialization of objects. This can play an impactful role in overall performance of your system, especially in microservice architecture, where a single user request is handled by multiple services communicating to each over over APIs or messaging using serialized objects.

The https://github.com/alecthomas/go_serialization_benchmarks page is a good store for related benchmarks on various serialization formats. Generally, formats that generate code from schema files (such as Protobufs) perform better than generic schema such as JSON, which need to use reflection to figure out object layout (fields and type). These types of serialization formats are, however, slightly more difficult to debug. For example, you can't just do a simple curl request to get the data; you would need a decoder with the deserialization to make sense of the encoded data.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset