Hi,

I'm trying to understand protobuf better, more specific how to use 
descriptors, e.g. when bundled with proto messages, and how to avoid 
conflicts/mismatches/breakage from different state in the data+descriptor 
bundle vs. the code+descriptor of the binary.

To share some background: my team has buils Autocap, which gets its config 
from the bbcp/prodspec pipeline: some code takes the *.textproto files (or 
generator rules outputting equivalent contend) and this is build as the 
Autocap config in prodspec format:
a *.textproto file with has the config internallized (binary gzipped blob) 
and contains the descriptors.

That is read by our code, in this case python (other parts in go and c++), 
and in b/184844468 we notice breakages e.g. when proto files are being 
moved. Easy enough to find and cherry pick. But it makes me wonder: maybe 
our whoel approach here is wrong in some way.

I think the background is that we have this generic data structure where we 
fit in (prodspec), that we have an growing/extending design (same proto is 
read and then written again and must not loose data - we scan the proto and 
work on the parts we understand, typically by adding data, so the structure 
as a whole grows and grows). Also we use Any types in many places and 
basically check the content for some type to decide if we can handle this 
part or need to fail/skip it.

So I wonder if there are good/best practice about such areas: how do deal 
with data+descriptor proto bundles, how to avoid breakages between compiled 
in proto definitions and descriptor data read when handling data.

Also if there is any recommendation about the specific edge case of proto 
file being moved around: I have no idea how we came to depend on the 
google3 path, but it sounds that is something we should be able to avoid in 
some way.

Any pointer for reading up and understanding this area better would be 
highly welcome.

Thanks, Andreas

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/988a8db4-2d3d-4da4-b5e1-fb698bed245dn%40googlegroups.com.

Reply via email to