.proto conformity between different senders/receivers?

54 views
Skip to first unread message

James Re

unread,
Apr 7, 2024, 2:48:56 PMApr 7
to Protocol Buffers
Hello,

I am new to new to Protobuf although I have worked a lot with other RPC and even ASN.1 binary message formats in the far past.

Is there a commonly used/accepted best practise in .proto schemas for defining conformity (e.g. ~ similar to the use of json-schema.org's $schema in JSON Schemas)?

Perhaps something like this:
    syntax = "proto3";// Schema version: 1.0
    string schema_url = 1;   // "http://my-org.org/protobuf_schemas/fruit/fruit-v1.0.1.proto"
    ... yada yada...

or perhaps as a URN (e.g. if there isn't an actual backing URL but just internal enterprise jurisdiciton)?
    syntax = "proto3";// Schema version: 1.0
    string schema_urn= 1;   // "urn:my-org.org:protobuf_schemas:fruit:v1.0.1"
    ... yada yada...

Is there some recommended or most common best practice? esp. to keep over the wire transfers small but uniquely numbered/identifiable within an organization or across organizations whose .proto senders/receivers may need to interoperate and establish conformity?

Thank you,
James

Reply all
Reply to author
Forward
0 new messages