Re: [protobuf] Message Migration Practice?

2016-02-16 Thread Vince
How to migrate when the schema structure change?
I'm talking about fields moving of a schema of a serialization file that 
needs to be migrated.



On Monday, September 10, 2012 at 11:11:45 PM UTC-4, Jason Hsueh wrote:
>
> The general practices for changing messages are listed here: 
> https://developers.google.com/protocol-buffers/docs/proto#updating.
>
>
> On Wed, Sep 5, 2012 at 7:04 PM, Minhyuk Kwon  > wrote:
>
>> Hello,
>>
>> I have plan for introducing protobuf to in our products for passing 
>> information of product's input project file structure.
>> And this information may frequently upgrade near future(via product 
>> version upgrade).
>>
>> So, I have a question. 
>> If I remove old field from message and add new field, Can I (auto)migrate 
>> without breaking change?
>> And if you guys have(or know) document for this kind practice, please let 
>> me know.
>>
>>
>> Regards,
>>
>> -Kwon
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Protocol Buffers" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/protobuf/-/Jka1u_famjkJ.
>> To post to this group, send email to prot...@googlegroups.com 
>> .
>> To unsubscribe from this group, send email to 
>> protobuf+u...@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 unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: Handle data migration. e.g. moving of field - Java

2016-02-16 Thread Vince
I'm facing the exact same problem.
Did you find any way to migrate data with PB?
The only way I can think of is to keep generated code of each schema 
version and program the migration with that.


On Thursday, May 8, 2014 at 4:39:50 PM UTC-4, Klaus Kraft wrote:
>
> Hi,
>
> so far I have defined messages and the only changes I had to handle were 
> additions and deletions of fields and renamings of fields. It was no 
> problem to handle this using ProtoBuf. Now I am in the situation that I 
> defined a message and a field of the message needs to be moved to a field 
> of another message. How can one handle such a data migration scenario? The 
> main problem is that I do not want to lose the data that was associated 
> with the original field that is moved. 
>
> I would also be interested in how to handle comparable, complex, data 
> migration scenarios that go beyond additions, deletions and simple 
> renamings. If there is no direct support from ProtoBuf, is it possible to 
> implement migrations in Java (I'm using Java as my target language)?
>
> Thanks in advance.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: Type migration?

2016-02-16 Thread Vince
I'm facing the exact same problem.
Did you find any way to migrate data with PB?
The only way I can think of is to keep generated code of each schema 
version and program the migration with that.
The link provided by Alkis treats only cases to add/remove fileds, but that 
not enough when the structure change.

Vincent


On Tuesday, July 8, 2008 at 5:18:28 AM UTC-4, Colin Fleming wrote:
>
> Hi all,
>
> Great to see this project, it saves me a bunch of work I was about to
> start! I'll need to adapt it a little but it will help me a lot.
>
> One thing I'd like to see is some support for type/schema modification
> and migration. If PB are used only as a network wire format this is
> probably not so important, but if you serialise your objects then it
> starts to become an issue. Has anyone thought about this? I'm not sure
> how this should be encoded - I guess you'd need at a minimum a version
> number (probably as the first element) and some conditional code to
> deserialise the various forms. I was thinking about using something
> similar to what Tangosol recommend here:
>
> http://wiki.tangosol.com/pages/viewpage.action?pageId=16694
>
> But it's a pretty limited solution. Any ideas? Patterns?
>
> Thanks for any help,
> Colin
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.