Removing dict from the RPC protocol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://www.gluster.org/mailman/listinfo/gluster-devel

[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux