[Gluster-devel] Removing dict from the RPC protocol

chris holcombe chris.holcombe at canonical.com
Wed Aug 19 19:01:43 UTC 2015


This is probably a controversial topic to bring up but, I think the dict 
that's in the RPC protocol needs to be removed. It generates a lot of 
confusion in the code because the dict is opaque. The XDR protocol has 
great support for serializing structs. If the dict was replaced with a 
struct it would be a lot easier to work with. If someone was trying to 
figure out the Gluster RPC protocol to create a new library to talk to 
Gluster the dict becomes a large problem. Every time there is a dict in 
the protocol you have to search for where the code is used in the 
Gluster source code and figure out what parameters are actually being 
added to the dictionary.

Here's an example:

Getting quota information from quotad.  The dict requires the following 
values that can only be found in the code by digging/breakpointing the 
daemon:
         gfid
         type
         volume-uuid
         version
Without these values quotad rejects your rpc request as invalid. How is 
someone supposed to find this information if it's only generated at 
runtime?  There's a few other examples but we all get the point.

The quotad rpc call could be replaced with a call that has an explicit 
struct to fill in.  That way everyone knows what will be passed and it's 
easy to encode/decode with any XDR library. Thoughts?

You can see the confused comments in my code as I try to tease the 
values out of the src code one by one: 
https://github.com/cholcombe973/Gluster/blob/master/src/rpc.rs#L734

-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gluster.org/pipermail/gluster-devel/attachments/20150819/6ca25140/attachment.html>


More information about the Gluster-devel mailing list