[ 
https://issues.apache.org/jira/browse/BOOKKEEPER-582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13624372#comment-13624372
 ] 

Ivan Kelly commented on BOOKKEEPER-582:
---------------------------------------

{quote}for server side BC, server is easy to detect protocol and handle the 
packet in right protocol. all these two proposals handle it. the client side 
BC, you tried to handle in handshake isn't tight with protocol, a client could 
connect first with new protocol to old server, and old server would respond 
with EBADVERSION and downgrade to use an old version protocol. it could be 
achieved using either new protobuf protocol. {quote}
In theory this is the case, but in practice I dont think it works out. If you 
look at
https://github.com/apache/bookkeeper/blob/branch-4.2/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieServer.java#L380
 we check the opcode and try to do a read depending on what we see. If the 
protobuf conspires to have a value opCode for an add, but the request isn't an 
add, for example, this will likely crash the server when trying to read the 
packet. I'll do some more testing on this on monday. It would be nice to be 
able to include the version in the protobuf AND preserve BC. I'm not sure it's 
possible though.

{quote}from my perspective, implementation is a minor thing. but protocol 
isn't. there are lots of protobuf definitions in either BOOKKEEPER or Hedwig, 
how the community could collaborate on the protocol changes smoothly is the 
goal I tried to figure out.{quote}
I think the guiding principle should be "don't break BC". If something doesn't 
break BC, it'll get past fairly easily. If it breaks BC it'll get a lot of 
scrutiny. 
                
> Make bookie and client use protobuf for requests (non-wire part)
> ----------------------------------------------------------------
>
>                 Key: BOOKKEEPER-582
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-582
>             Project: Bookkeeper
>          Issue Type: Sub-task
>            Reporter: Ivan Kelly
>            Assignee: Ivan Kelly
>             Fix For: 4.3.0
>
>         Attachments: 
> 0002-BOOKKEEPER-582-Make-bookie-and-client-use-protobuf-f.patch, 
> 0002-BOOKKEEPER-582-Make-bookie-and-client-use-protobuf-f.patch, 
> 0002-BOOKKEEPER-582-Make-bookie-and-client-use-protobuf-f.patch, 
> 0003-BOOKKEEPER-582-Make-bookie-and-client-use-protobuf-f.patch
>
>
> Make the client and the bookie use protobufs internally. This is the first 
> step to using protobufs on the wire, but for the moment, BookieRequestHandler 
> decodes the old wire protocol into the protobuf messages. Once this is in, 
> enabling on the wire will be very simple, and the old manual serialization 
> can be made "legacy" (still supported, but deprecated).

--
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

Reply via email to