Transport Protocol

Support for Google Remote Procedure Call Protocol (gRPC)

gRPC is a high-performance general RPC open-source software framework running over HTTP2 protocols. Both communication parties perform secondary development based on the framework, so that they focus on services and do not need to pay attention to bottom-layer communication implemented by the gRPC software framework.

Telemetry uses the gRPC protocol to report the data encoded in GPB format to the collector.

The gRPC protocol applies to telemetry static subscription and dynamic subscription.

Figure 1 shows the gRPC protocol stack layers.

Figure 1 Description of gRPC protocol stack layers

Table 1 describes the layers.

Table 1 Layers

Layer

Description

TCP layer

This is a bottom-layer communication protocol, which is based on TCP connections.

TLS layer

This layer is optional. It is based on the TLS–encrypted channel.

HTTP2 layer

The HTTP2 protocol carries gRPC, using HTTP2 features such as bidirectional streams, flow control, header compression, and multiplexing request of a single connection.

gRPC layer

This layer defines the protocol interaction format for remote procedure calls.

Data model layer

NOTE:

The data model layer is divided into three layers, which are defined in different .proto files. To establish a gRPC connection between the collector and a network device, use the .proto files for interconnection. The .proto files on the two ends must be the same, which facilitates decoding.

RPC layer

  • Telemetry static subscription: defined in the huawei-grpc-dialout.proto file.

  • Telemetry dynamic subscription: defined in the huawei-grpc-dialin.proto file.

Telemetry layer

  • When the encoding format of the data to be sent to the collector is GPB, it is defined in the huawei-telemetry.proto file.

  • When the encoding format of the data to be sent to the collector is JSON, you do not need to use the .proto files at the telemetry layer for decoding.

Service data layer

  • If the encoding format of the data to be sent is GPB, the encoding field in the huawei-telemetry.proto file is Encoding_GPB (with the value of 0), the data_gpb field carries sampling data in GPB format, and the data_str field is empty.

    NOTE:

    The data_gpb field needs to be decoded by the corresponding service .proto file. The sensor_path field in the huawei-telemetry.proto file identifies the specific service .proto file. For example, if the value of the sensor_path field is huawei-ifm:ifm/interfaces/interface, the corresponding data structure is defined in the huawei-ifm.proto file.

  • If the encoding format of the data to be sent is JSON, the encoding field in the huawei-telemetry.proto file is Encoding_JSON (with the value of 1), the data_str field carries sampling data in JSON format, and the data_gpb field is empty.

    NOTE:

    If the JSON encoding format is used, you only need to use the .proto files at the RPC layer for decoding. The .proto file at the telemetry layer and the corresponding service .proto file are not required.

For details about gRPC fundamentals, see Understanding gRPC.

Support for User Datagram Protocol (UDP)

UDP is a datagram-oriented simple transport-layer protocol. It does not provide reliability, flow control, or error recovery functions for IP. UDP is applicable to networks with low reliability requirements and economical transmission.

Telemetry uses the UDP protocol to report the data collected to the collector.

The UDP protocol applies to telemetry static subscription.

Figure 2 shows the UDP protocol stack layers.

Figure 2 UDP protocol stack layers

Table 2 describes the layers.

Table 2 Layers

Layer

Description

UDP layer

UDP-based communications protocol.

Data model layer

NOTE:

The data model layer is divided into three layers, which, except the message header layer, are defined in different .proto files. To establish a UDP connection between the collector and a network device, use the .proto files for interconnection. The .proto files on the two ends must be the same, which facilitates decoding. For description of the .proto files, see the relevant content of gRPC.

Message header

For the definition of message header architecture, see UDP based Publication Channel for Streaming Telemetry.

Telemetry layer

  • When the encoding format of the data to be sent to the collector is GPB, it is defined in the huawei-telemetry.proto file.

  • When the encoding format of the data to be sent to the collector is JSON, you do not need to use the .proto files at the telemetry layer for decoding.

Service data layer

  • If the encoding format of the data to be sent is GPB, the encoding field in the huawei-telemetry.proto file is Encoding_GPB (with the value of 0), the data_gpb field carries sampling data in GPB format, and the data_str field is empty.

    NOTE:

    The data_gpb field needs to be decoded by the corresponding service .proto file. The sensor_path field in the huawei-telemetry.proto file identifies the specific service .proto file. For example, if the value of the sensor_path field is huawei-ifm:ifm/interfaces/interface, the corresponding data structure is defined in the huawei-ifm.proto file.

  • If the encoding format of the data to be sent is JSON, the encoding field in the huawei-telemetry.proto file is Encoding_JSON (with the value of 1), the data_str field carries sampling data in JSON format, and the data_gpb field is empty.

    NOTE:

    If the JSON encoding format is used, you only need to use the .proto files at the RPC layer for decoding. The .proto file at the telemetry layer and the corresponding service .proto file are not required.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic