Re: [protobuf] Any type versus composition in protobuf 3

2015-05-08 Thread 'Feng Xiao' via Protocol Buffers
I would only resort to Any if normal protobuf constructs cannot do the job. In your case I don't see any benefit from the using of Any. To me a strictly better approach then option B is: message Common { string fruit = 1; string vegetable = 2; oneof other_ingredients { MessageA a = 3; }

[protobuf] Re: Protobuf Buffers v3.0.0-alpha-1

2015-05-08 Thread Chris
Thanks for your great work. I'm considering migrating to version 3. Is existing proto2 data (i.e. serialized messages) transparently loadable in a proto3-aware application ? On Wednesday, December 10, 2014 at 11:51:01 PM UTC-5, Feng Xiao wrote: > > Hi all, > > I just published protobuf v3.0.0-al

[protobuf] Any type versus composition in protobuf 3

2015-05-08 Thread Mike McElligott
Hi I have a collection of message types which all share a common set of fields. Each message type has an additional number of attributes particular to that message type. Two choices I am considering on how to structure our schemas Option A - import and compose common