I'm using twisted. I have my protocols set up so that, to send an RPC, I do protocol.send("update_status", data). To document which RPCs I've implemented, I make a separate function call for each one, so in this case I'd call REQUEST_UPDATE_STATUS(data) to send that RPC. When a protocol receives an RPC, a function gets called based on its name, in this case, CMD_UPDATE_STATUS.
The problem is that REQUEST and CMD are a bit awkward. I can mistake REQUEST as part of the command, for example, REQUEST_NEW_DATA, and that would end up triggering an RPC called 'new_data'. However, REQUEST_REQUEST_NEW_DATA is just silly.
CMD is also awkward, as a REQUEST_SEND_NEW_DATA will become CMD_SEND_NEW_DATA, which is a bit awkward.
Any tips?