Phillip Pearson - web + electronics notes

tech notes and web hackery from a new zealander who was vaguely useful on the web back in 2002 (see: python community server, the blogging ecosystem, the new zealand coffee review, the internet topic exchange).

2006-4-27

XML-RPC without the RPC?

XML-RPC is two things: a serialization format, and an RPC protocol.

It's very convenient to use because once you know the XML-RPC URL for a site, you can talk to it as if it were an object inside your own program.

However, many people don't like using RPC protocols over the web, because they never use HTTP GET and thus bypass caches. Often you *want* things to be cached. So they use a "REST" system, which uses HTTP GET when appropriate, and returns XML.

But - this solves the caching problem, but throws away a major advantage of XML-RPC: the fact that the methodResponse XML can be decoded straight into a data structure that suits all scripting languages.

So: how about keeping the response format the same (keep the methodResponse XML and XML-RPC encoding for data) but changing the request to use HTTP GET.

XML-RPC-REST?

At the moment I'm building the long promised PeopleAggregator API, and I'm trying to put in as many ways of accessing it as possible. So far I have XML-RPC and REST, and if you use the REST option, you can choose to have the output in XML or JSON. It wouldn't be hard to add a third REST output format: XML-RPC!

I'm not sure if anyone would use it, but I thought it was worth writing about :-)

Update: Leonard thought of this first - see the comments for details.

... more like this: [, , , ]