You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After reviewing users of both of these, I'm wondering if WriteEncoded() is necessary? Why do we not simply apply the request object to ReqED and the response to ResponseED? What are we gaining by performing encoding / decoding out? For example, in leaseClient.go why not just use leaseLib.LeaseReq -> ReqED and leaseLib.LeaseRep -> ResponseED?
One upside of removing external encoding / decoding is that WriteEncodedAndGetResponse() could be deprecated if we can detect the presence of ResponseED -- if present on write, then we'd know to expect a response buffer and how to decode it.
We need both Write() and WriteEncoded() as
Write() is used by covid and foodpalace we have just the server and client, where we encode the request and pass it to the server.
where as in WriteEncoded() we use it in ncpc and contraol plane where we have http layer as well, where we encode the request from application and pass through http, if we don't use WriteEncoded function we will have overhead of decoding and encoding at proxy. If not, we can remove normal write function and have only WriteEncoded function instead.
I understand that we must encode / decode based on the situation. My point is why can we not simply test for the presence of the encode / decode interfaces in PmdbReqArgs and perform the operation if the interfaces are present?
In the examples you give above, covid-app and foodpalace would set ReqED and ResponseED accordingly and other users, like ncpc would not.
After reviewing users of both of these, I'm wondering if
WriteEncoded()
is necessary? Why do we not simply apply the request object toReqED
and the response toResponseED
? What are we gaining by performing encoding / decoding out? For example, inleaseClient.go
why not just useleaseLib.LeaseReq
->ReqED
andleaseLib.LeaseRep
->ResponseED
?One upside of removing external encoding / decoding is that
WriteEncodedAndGetResponse()
could be deprecated if we can detect the presence ofResponseED
-- if present on write, then we'd know to expect a response buffer and how to decode it.niova-pumicedb/go/pumiceDB/client/PumiceDBClient.go
Line 126 in 3c0456d
The text was updated successfully, but these errors were encountered: