[
https://issues.apache.org/jira/browse/BOOKKEEPER-587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13608752#comment-13608752
]
Ivan Kelly commented on BOOKKEEPER-587:
---------------------------------------
I hadn't seen that code. But the protobuf stuff is fairly similar except for
places where I've made a conscious decision to do things differently. One major
thing is with enums, and this is something that has bitten us in Hedwig.
* If you define a enum in protobuf, you've locked in the values that enum can
have. If you add another value to the enum, any old decoders will barf when
they see the new value. For this reason i've made the error code in responses
an int, not an enum.
* I've gotten rid of a flags bitmap and just use boolean fields. (Flags is
another place you would have the enum issue).
* I've kept the version byte outside of protobuf. If we want new clients to
work with old servers, this is a must.
* I've kept the data part outside of protobufs. This avoids a memcpy in and out
of the protobuf bytestring.
* OperationType is a) redundant and b) an enum. The enum issue will prevent you
adding new operations in the future.
> Make BK use protobufs on the wire
> ---------------------------------
>
> Key: BOOKKEEPER-587
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-587
> Project: Bookkeeper
> Issue Type: Sub-task
> Reporter: Ivan Kelly
> Assignee: Ivan Kelly
> Fix For: 4.3.0
>
> Attachments:
> 0003-BOOKKEEPER-587-Make-BK-use-protobufs-on-the-wire.-Bu.patch
>
>
> Building on BOOKKEEPER-582, make bookkeeper use protobufs for on wire
> transmission.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira