Serialization: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 17: Line 17:


==Ensure Data Schemas are Kept in Sync between Clients and Servers==
==Ensure Data Schemas are Kept in Sync between Clients and Servers==
For serialization formats with explicit schema definitions such as [[Apache Thrift]], [[Avro|Apache Avro]] and [[Protocol Buffers]], the client and servers should be kept in sync with the latest schema versions.
==Document Implicit Details==
==Document Implicit Details==
==Use Built-in Structures for Representing Time==
==Use Built-in Structures for Representing Time==
==Use Consistent Naming==
==Use Consistent Naming==
==Follow the Official Style Guide==
==Follow the Official Style Guide==

Revision as of 21:56, 4 October 2023

Internal

Overview

Serialization is a process that encodes and decodes data for storing or sending between services. The process of transforming the original data into transit data is called serialization. The inverse process of transforming transit data into the original data is called deserialization.

Serialization Formats

Serialization Best Practices

Keep your Schema Backward Compatible

Avoid changes in data schema that would break existing callers. Such changes include modification (renaming or removal) of field names and types. Adding fields is fine.

Ensure Data Schemas are Kept in Sync between Clients and Servers

For serialization formats with explicit schema definitions such as Apache Thrift, Apache Avro and Protocol Buffers, the client and servers should be kept in sync with the latest schema versions.

Document Implicit Details

Use Built-in Structures for Representing Time

Use Consistent Naming

Follow the Official Style Guide