Extensions<http://code.google.com/apis/protocolbuffers/docs/proto.html#extensions>are commonly used to allow other parties to independently add fields to a message. To avoid tag number collisions, you can assign each company a separate extension range.
On Wed, Feb 23, 2011 at 5:06 AM, clayton <nashi...@gmail.com> wrote: > I am trying to convince management that protocol buffers are a good > idea for a standard messaging scheme we want to put out. We would > create a proto file that describes a message for interoperability > between different systems and even between different companies. We > also want the messaging scheme to be flexible and expandable (i.e. > different groups can add optional messages that are unique to their > program without breaking the messaging scheme). Protocol buffers seem > like a wonderful fit. Our problem is this. Consider this scenario, > Company A and B get the protobuf file that defines the new standard. > Company A wants to add optional fields to their message, > (understanding that nothing should break) without publishing the > optional fields because they are specific to some internal message. > Company B also wants to add optional fields to their message for the > same reason, again without publishing the optional fields. Now in > this situation, my understanding is, that because the variant key > value is between 1 - 2^29-1, none of the keys are actually global and > so theoretically Company A and B could be stomping on each other > without knowing it (if both optional fields are using the same key). > If this is incorrect, please let me know. What would be the protobuf > solution to the problem above? i.e. how can company A keep for > stomping on company B? Is it possible to somehow optionally define > global unique keys (i.e. 16 byte) at the highest level? > > Thanks. > > -- > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" group. > To post to this group, send email to protobuf@googlegroups.com. > To unsubscribe from this group, send email to > protobuf+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/protobuf?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to protobuf@googlegroups.com. To unsubscribe from this group, send email to protobuf+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.