By default, gRPC uses Protocol Buffers, Google’s mature open source mechanism for serializing structured data (although it can be used with other data formats such as JSON).
gRPC supports the following two data encoding techniques from your options:
B. JSON
D. ProtoBuf
Explanation: gRPC, by default, uses Protocol Buffers (ProtoBuf), Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data, as its interface definition language (IDL). This is the recommended serialization format for gRPC.
As for JSON, while gRPC does not natively support it, it is possible to use JSON as a serialization format in gRPC with certain workarounds.
B & D
By default, gRPC interprets application/grpc content type as application/grpc+proto content type. So by default gRPC uses Protocol Buffers as encoding format.
But why content type has such name with a proto subtype? This is because messages in gRPC are sent as length-delimited stream of binary blobs. This format can’t be changed, so content type should always be in the form of application/grpc+{subtype}, where {subtype} can be anything you want, e.g. proto, fbs, json, thrift, bson, msgpack.
B and D
"So by default gRPC uses Protocol Buffers as encoding format." ...
"This format can’t be changed, so content type should always be in the form of application/grpc+{subtype}, where {subtype} can be anything you want, e.g. proto, fbs, json, thrift, bson, msgpack."
https://grpclib.readthedocs.io/en/latest/encoding.html
Json and ProtoBuf (B and D)
Explanation:
gRPC is an open-source RPC framework. It is based on Protocol Buffers (Protobuf), which is an open source binary serialization protocol. gRPC provides a flexible, efficient, automated mechanism for serializing structured data, like XML, but is smaller and simpler to use. You define the structure using protocol buffer message types in .proto files. Each protocol buffer message is a small logical record of information, containing a series of name-value pairs.
Cisco gRPC IDL uses the protocol buffers interface definition language (IDL) to define service methods, and define parameters and return types as protocol buffer message types. The gRPC requests are encoded and sent to the router using JSON. Clients can invoke the RPC calls defined in the IDL to program the router.
This section is not available anymore. Please use the main Exam Page.350-901 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Jerryang
Highly Voted 3Â years, 6Â months agoWriter
Highly Voted 3Â years, 6Â months agotartarus23
Most Recent 6Â months agoandym12
1Â year, 4Â months agoGuillaume
2Â years agoNpirate
2Â years, 4Â months agobboylord
2Â years, 7Â months agosan111
3Â years, 2Â months agoblezzzo
3Â years, 3Â months agoFR99
3Â years, 3Â months ago