Apache Avro serialization and deserialization (Java implementation)

Source: Internet
Author: User
Tags serialization

Like two communication to find a mutual understanding of the language, in the domestic for Putonghua, running abroad and more in English, two inter-process communication also need to find a data format that everyone can understand. Simple as JSON, XML, which is a self-descriptive format, XML has a schema definition, but there is no formal JSON schema specification. In the efficiency of the occasion, the text-based data interchange format can not meet the requirements, so there are binary Google protobuf and Apache Avro. In the Apache ecosystem like Hadoop, Kafka naturally chooses Avro.

Avro supports multiple languages, such as C, C + +, C #, Java, PHP, Python, and Ruby. It uses JSON to define the schema, which can be used by the schema to generate data objects of the corresponding language, such as Java's Avro-tools.jar. This can be exchanged for objects across the process of cross-language transparent implementations.

The Avro Schema file is the communication protocol of data production and consumption end; We can generate the corresponding Java object from the Schema, and then exchange it with a specific Java object, or simply interact with it without generating a Java object GenericRecord . For the simplicity of manipulating data, we typically use the previous approach, which is to generate specific data transfer objects. Read the full >> ;


Apache Avro serialization and deserialization (Java implementation)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.