First of all, I suggest expanding the extension range:
  extensions 1 to max;

This gives you 2^29 numbers to work with (the remaining three bits are
reserved by the wire format to identify types).

Now you can easily assign a large range of extension numbers to each office,
or even to each developer, and they can use them as they see fit.

Or if you just chose numbers randomly, you'd have to have around 10k
extensions before you'd need to start worrying about collisions.

On Mon, Oct 25, 2010 at 12:03 PM, maninder batth
<batth.manin...@gmail.com>wrote:

> We have a geographically distributed team and instant communications
> are not possible. Given this constraint in mind, i am wondering how to
> manage extensions. To clarify my question, consider a message like
> message Request {
> extensions 1 to 100;
> }
>
> Different developers would be working on extending Request. For
> example developer A uses the above request in a Client.proto file,
> such as
> extend Request {
> optional int64 clientId = 1;
> }
>
> Developer B, uses the above request in a Location.proto file such as
> extend Request {
> optional int64 locationId = 1;
> }
> Question is how can developer A and B, extend the message Request,
> without worrying about extension slots being already occupied by some
> other message?
> As shown above, both developers reserved the slot 1, with different Id
> types.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To post to this group, send email to proto...@googlegroups.com.
> To unsubscribe from this group, send email to
> protobuf+unsubscr...@googlegroups.com<protobuf%2bunsubscr...@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 proto...@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.

Reply via email to