liveBook · Manning

Avro

As explained in Microservices Patterns, Second Edition

A schema-based data serialization system that supports compact encoding and schema resolution between writers and readers.

Avro is a binary message format designed for compact, efficient payloads in high-throughput systems. It encodes fields without identifiers, relying on the writer’s schema to determine their order and types. section 8.1.6

Account for these implementation trade-offs:

  • Consumers need access to the correct writer schema before deserializing a message; a schema registry is typically used in distributed systems. section 8.1.6
  • An IDL compiler generates message classes and serialization code, adding tooling while supporting an API-first design. section 8.1.6
Table 8.3 The benefits and drawbacks of text-based vs. binary formats for message payloads

Format

Benefits

Drawbacks

Text

  • Human-readable
  • Simple to process
  • Self descriptive
  • Verbose
  • Inefficient to process large messages

Binary

  • Compact
  • Fast to process
  • Requires more tooling
  • Not human-readable

Compare the compactness and processing efficiency of binary formats with their tooling requirements and lack of human readability. section 8.1.6

How Microservices Patterns, Second Edition covers it

How deep it goes
Contrasts field encoding with Protocol Buffers and explains schema-dependent deserialization, but does not detail registry operation.
What it assumes
Requires consumers to access the writer’s schema before deserializing messages.
What you can do after
Evaluate Avro’s compactness and schema requirements against the tooling and flexibility trade-offs of other message formats.
How it connects
Connects Avro to IDLs, schema registries, and Protocol Buffers.

Also explained in

Compare how 4 books explain Avro →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Microservices Patterns, Second Edition. The section links point to the parts of the book it draws on.