Golden rule:

- don't change a field, or re-use a field-numer

In particular, your string vs int *is* a breaking change. Most of the others 
are not; additional data can be ignored or handed at runtime via extensions if 
you wish. Of course, if you add a new field you should probably make it 
"optional" for clarity.

Beyond that, they are designed with tolerance in mind. I think the best thing 
to do *right now* would be to run those exact scenarios, so you are happy with 
how it works.

Marc

On 25 Jul 2011, at 16:38, "[email protected]" <[email protected]> wrote:

> I am very new to GPB, and have not found documentation on this topic,
> so I am asking the community. What is the best way to manage
> versioning of GPB objects if you modify the .proto file and change the
> definition of a message. Since I plan to have millions to tens of
> millions of GPB objects, I am concerned that once we get going, and
> determine we need to make a change to the structure of our .proto
> file, that I will be faced with doing a conversion/migration of gobs
> of data. Essentially I want to be able to deserialize objects even
> after I have made changes to my compiled classes - with as minimal
> impact as possible. Some use cases I want to consider are:
> 
> 1)add a new field to a message
> 2)change the field type(string vs int32)
> 3)remove/deprecate a field within a message entirely
> 4)remove a message entirely
> 5)Add a new field that is a reference to a new message type.
> 6)Any likely scenario I missed that you all have dealt with that can
> cause an issue?
> 
> Looking for any guidance/recommended best practices, or low hanging
> fruit that I missed in my reading.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Protocol Buffers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to