On a complete aside ... I have been very pleased with RPC::Any as a basic framework for a recent project. (It is not an exact fit to this requirement, but a very fine framework for RPC. Just sayin’ FYI.)
Edit: I have also learned to add the following features, as part of the descriptive information that goes back and forth (if it’s not already provided by the protocol):
- A version-number. If the format changes, change the number. You never know when an old version of something is still out there wanting to talk to you.
- A randomly generated string, produced by the client, which the host must return verbatim. Excellent for matching up requests with responses. (But don’t be tempted to use it as a reliable-identifier on the host-side.)