Closed erikleitch closed 8 years ago
Take all of this with a grain of salt, it's just me being pedantic:
MsgCode
104
would then be used here to select the TTB codec service, not the PB one: https://github.com/basho/riak_api/blob/perf/query_ttb_encoding/src/riak_api_pb_server.erl#L212-L219tcp
instead of pb
.@lukebakken We'd still want to make the changes Erik is prosing here. You'd just take it one step further by renaming to a TCP server, right?
@javajolt yeah these changes are minor. I started work on basho/riak_kv#1379 today and will get that done tomorrow.
I think the renaming proposed here is ok, however I think we should table any further pedantry for a post-TS1.3-release timeframe. (Technically the whole riak_pb repo is now a misnomer, and should be riak_tcp, or a separate repo should be created for other encodings, etc., but these are changes that would break lots of rebar.config dependencies, builds, etc)
Actually, I don't think even this renaming is advisable at this point. riak_api_pb_XXX naming convention is used all over riak_kv and yokozuna. I would suggest a separate effort to renormalize our naming scheme when we are not a few days out from a release.
+1 03471df
@borshop merge
Context
This is part of a set of related PRs to rework handling of PB vs TTB encoding for client/server messages:
The original addition of alternate encodings was a hybrid implementation which 1) required the client and server to agree via a handshaking protocol about what encoding would be used, 2) used messages for both encodings that were generated from the .proto files, but some were only used for TTB encoding, and 3) allowed the server to send PB-encoded responses to TTB-encoded requests.
This work is an attempt to rationalize this situation, and to simplify how differently-encoded messages are handled within riak. The guiding principles are:
Notes
Changes in this repo:
This change removes the need to synchronize encoding schemes between client and server that was accomplished by sending the PB_TOGGLE_ENCODING message. Changes to riak_api_pb_server.erl simply remove all code that deals with the now-obsolete handshaking.