I've been trying to find a good form of RPC to standardize on, but so far I've ran into a ton of walls and was wondering what the stackoverflow communities view was.
My ideal RPC would provide the following:
- Somewhat wide support in other languages, in that people shouldn't have to write a custom stack to use our server
- Input validation
- Ideally, some way to turn the above input validation into some sort of automated documentation to distribute
- Clean and maintainable code
I am a fan of the catalyst framework and would prefer to stick to it, but if there is a clearly better alternative for RPC servers I'd be open to that as well.
So far I have looked at the following:
Catalyst::Controller::SOAP Doesn't appear to support returning of complex data structures, only string('literals'). I could probably serialize data on top of that, but that seems very hacky. It also lets you return a pre-formed XML object, but I couldn't get that to work and it looks like you'd need to re-create a lot of SOAP data structure for it to work.
I do like the idea of WSDLs, but the complexity of the overall spec also makes me wonder how well support for communicating with other languages will be.
Custom POSTing XML based controller We tried to roll our own by hand in a similar way to how we've seen two other projects do it recently where there is a dispatch url that you post XML to. This lets you have XSD validation/documentation, but required creating a lot more code than we want to maintain at this point.
Catalyst::Plugin::Server::XMLRPC Gave a warning about using a deprecated method that will be removed in a future version of Catalyst. No input validation or doc creation, but otherwise the best I've found
JSONRPC Looks pretty similar to XMLRPC only the module is actually updated. I'll probably go with this next unless someone suggests something better There also appears to be two different modules for catalyst that do JSONRPC