DevNet Associate (DEVASC) v1.0Infrastructure and AutomationEasy
A network device supports telemetry streaming using gRPC. Which data encoding format is typically used with gRPC for efficient serialization and deserialization of structured data?
- AJSON
- BProtocol Buffers
- CXML
- DYAML
Show answer & explanationAnswer & explanation
Correct answer: B. Protocol Buffers
gRPC (Google Remote Procedure Call) primarily uses Protocol Buffers (protobuf) as its Interface Definition Language (IDL) and for efficient serialization of structured data. While gRPC can technically support other data formats, protobuf is its native and most performant choice.
Why the other options are wrong
- A. JSON is common for REST APIs but less performant than protobuf for gRPC.
- C. XML is used by NETCONF, not typically gRPC.
- D. YAML is often used for configuration files, not typically for gRPC data streaming.
Protocol Buffers (protobuf)
Protocol Buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data. They are smaller, faster, and simpler than XML or JSON for data interchange.
- Efficient data serialization format.
- Language-neutral, platform-neutral.
- Used extensively with gRPC.
- Defined using .proto files.
Memory trick: gRPC's fast data is packed in Protobuf.