---
title: "XML-RPC case study redux, Part II: REST and I"
date: 2002-11-27T16:05:02-05:00
url: https://blog.lmorchard.com/2002/11/27/oooccd/
author: Les Orchard
---

# XML-RPC case study redux, Part II: REST and I

So, from my <a href="http://www.decafbad.com/news_archives/000333.phtml">last installment</a>, I left off with this:  My daily situation with regards to integrating the web-based services of various parties boils down to what I can explain in 30 minutes to a developer of unknown competence to whom I'm barely a priority.  So far, I've been able to apply <a href="http://www.decafbad.com/twiki/bin/view/Main/XmlRpc">XmlRpc</a> as a solution to this problem with a great degree of success.
<br /><br />
About this, endulging me although I'm sure issues like mine have been hashed out a million times already on various mailing lists, <a href="http://www.blogstream.com/pauls/1038403139">Paul Prescod writes</a>:<blockquote><i>There's nothing wrong with the way you've used XML-RPC and I've used it that way myself. I only write to ensure that you (and anyone reading) understands the costs and benefits of this approach. You've given up on many of the feature of the underlying XML and HTTP technologies. If you don't need the features, then amen, let her rip. But people building more substantial apps do need them.</i></blockquote>
<br /><br />
Yes.  So, I know that my chosen solution has its blemishes and land mines awaiting my step.  But, none of them have bitten me yet, nor do I expect them to for some time.  On the contrary, for every practical application of <a href="http://www.decafbad.com/twiki/bin/view/Main/XmlRpc">XmlRpc</a> we've deployed, we've had happy clients.  While working in this industry, the <a href="http://www.google.com/search?q=80/20%20rule">80/20 rule</a> has been beaten into me - so if a solution that's 20% complete solves 80% of our problems, it's time to move onto the next problem.
<br /><br />
This, however, is a dangerous thing to become complacent about - there're still 20% worth of problems out there for which this solution falls down.  And each one will become a work-till-3-am nightmare when they hit.  And besides, I'm a perfectionist and a purist at heart, so the dirtiness of this solution will never fail to irk me.  It may be simple, but simple is not necessarily elegant.  So what about the rest of Paul's points?
<br /><br />
<blockquote><i>The first axis of flexibility you've given up is in character set. XML-RPC disallows Unicode character strings.</i></blockquote>On one hand, my impulse is to respond to this by invoking <a href="http://www.acronymfinder.com/af-query.asp?String=exact&amp;Acronym=YAGNI">YAGNI</a> - since our use of <a href="http://www.decafbad.com/twiki/bin/view/Main/XmlRpc">XmlRpc</a> involves messages between machines, I don't care about localizing those.  I'll just keep to language neutral data in there.  But, I'm naive.  With a bit of pondering, I can identify at least one area where user-supplied input needs to be traded - shared registration and login for global promotions.  And if I can identify one, there's bound to be more.  I don't have as much experience with Unicode and handling languages other than English as I'd like, so I can't trust my assumptions here.
<br /><br />
<blockquote><i>XML-RPC is brutally non-extensible. ... Dave Winer has been actively hostile to every effort to evolve XML-RPC.</i></blockquote>In this case, I'd say this is a good thing, for <a href="http://www.decafbad.com/twiki/bin/view/Main/XmlRpc">XmlRpc</a> in particular.  It does what it does, no more and no less, and this will never change.  I will never need to bring up versions of the spec in my 1/2 hour conversation with the junior engineer.  And though I don't want to second guess Dave Winer, I assume this is the goal in his insistence on <a href="http://www.decafbad.com/twiki/bin/view/Main/XmlRpc">XmlRpc</a> being ever frozen.  The alternative at which he points, if memory serves, is SOAP.
<br /><br />
<blockquote><i>The third aspect: XML itself. What will happen when and if your industry, whatever it is, canonizes a schema for what you do, like the hundreds of existing ones. ... Maybe your industry isn't organized enough to define a schema for whatever it is you do.</i></blockquote>Bingo.  Our industry is neither mature nor organized enough to conceive of any sort of schema.  Our products and the concepts involved in our work are in constant change, not to mention the conditions of the market and what will continue to work.
<br /><br />
<blockquote><i>Another way of attacking your interoperability problem would be to start from that point of view, defining the XML and then working back to the <a href="http://www.decafbad.com/twiki/bin/view/Main/REST">REST</a> system. That's a much more natural way to define a <a href="http://www.decafbad.com/twiki/bin/view/Main/REST">REST</a>-based web service and is arguably a better way to define web services in general. I would be curious whether you tried this.</i></blockquote>Nope, haven't tried this.  This is where I start calling things "ivory tower".  To me, it makes elegant sense.  
<br /><br />
<blockquote><i>You say you tried "REST-ish URL schemes" but that isn't the same as trying <a href="http://www.decafbad.com/twiki/bin/view/Main/REST">REST</a>. In particular, you don't say much about what your XML strategy was.</i></blockquote>Calling our early interop schemes "REST-ish" may have been too strong an association with <a href="http://www.decafbad.com/twiki/bin/view/Main/REST">REST</a>.  No XML strategy.  More like: "Make a GET to this URL with these query parameters, documented here.  You'll get a simple text response back, documented here."  This was always balked at, though I thought it was the simplest thing in the world.  I might have some thoughts on the failure of this, if I think about it some more.
<br /><br />
<blockquote><i>I don't know your suppliers, but in the vast majority of situations I have been exposed to, they "get it" if you tell them: "here are some XML example documents. POST things like that to me when you want me to do something and GET them from me when you want to get information from me."</i></blockquote>Whenever XML is brought up, fear rises and eyes glaze.  We're the "supplier" in most situations, and it's rare that our clients are tech-centered companies.  They have a web site, and maybe a team maintaining it if we're lucky.  
<br /><br />
<blockquote><i>You depicted the situation as SOAP on one side (grungy), <a href="http://www.decafbad.com/twiki/bin/view/Main/REST">REST</a> on the other (ivory tower) and XML-RPC in the middle. <a href="http://www.decafbad.com/twiki/bin/view/Main/REST">REST</a> is basically the same old CGI-ish stuff we've been doing for a decade so I don't see how it is very ivory towerish.</blockquote></i>Well, I'm mixing audiences here.  SOAP, to me and my lack of time with it, seems grungy and in flux.  To my clients, <a href="http://www.decafbad.com/twiki/bin/view/Main/REST">REST</a> seems out there, especially if I ever try to explain to them what the letters stand for.  :)
<br /><br />
"What's a siggy?"  
<br /><br />
"You mean a C-G-I?"
<br /><br />
In explaining <a href="http://www.decafbad.com/twiki/bin/view/Main/XmlRpc">XmlRpc</a>, I usually say something long the lines of "your people's boxes talk to my people's boxes," then point them at the website that says largely the same thing.  Of course, this begs the question of my effort and competence in explaining <a href="http://www.decafbad.com/twiki/bin/view/Main/REST">REST</a> to others, which I feel is lacking thus far.  Because, well, <a href="http://www.decafbad.com/twiki/bin/view/Main/REST">REST</a> is also their boxes talking to my boxes.  And, I haven't found a website at which to point both techie and non-techie audiences to "get it".
<br /><br />
<blockquote><i>...perhaps <a href="http://www.decafbad.com/twiki/bin/view/Main/REST">REST</a> doesn't apply to you. Yet. ... You say that <a href="http://www.decafbad.com/twiki/bin/view/Main/REST">REST</a> doesn't "feel finished" to you. Nor to me. Our industry is in the middle of a huge migration to extensible formats like <a href="http://www.decafbad.com/twiki/bin/view/Main/RSS">RSS</a> which builds on <a href="http://www.decafbad.com/twiki/bin/view/Main/RDF">RDF</a> which builds on XML.</i></blockquote>I don't think <a href="http://www.decafbad.com/twiki/bin/view/Main/REST">REST</a> quite applies to us yet.  I'd like it to.  Maybe once we, as a company, have formed much stronger partnerships I can get past the 30 minute barrier and get to some real discussions and establish things like XML schema.
<br /><br />
<blockquote><i>When people are comfortable with extensible, hyperlinked formats, <a href="http://www.decafbad.com/twiki/bin/view/Main/REST">REST</a> will seem like a no-brainer.</i></blockquote>The more I read and think about <a href="http://www.decafbad.com/twiki/bin/view/Main/REST">REST</a>, the more I agree with this.  It's just that I find it very hard to sell the idea yet.  Again, this may be the nature of the beast for whom I work, and it may be my lack of ability to describe this simply.  
<br /><br />
But for now, it seems that the ability to throw a random unknown web developer an API and a URL with less than 30 minutes' accompanying discussion, and get results, seems to work for us.
<!--more-->
shortname=oooccd

<div id="comments" class="comments archived-comments">
            <h3>Archived Comments</h3>
            
        <ul class="comments">
            
        <li class="comment" id="comment-221084102">
            <div class="meta">
                <div class="author">
                    <a class="avatar image" rel="nofollow" 
                       href="http://www.prescod.net"><img src="http://www.gravatar.com/avatar.php?gravatar_id=6c04a6792c6196149d2f9e14894a8b6d&amp;size=32&amp;default=http://mediacdn.disqus.com/1320279820/images/noavatar32.png"/></a>
                    <a class="avatar name" rel="nofollow" 
                       href="http://www.prescod.net">Paul Prescod</a>
                </div>
                <a href="#comment-221084102" class="permalink"><time datetime="2002-11-28T00:39:52">2002-11-28T00:39:52</time></a>
            </div>
            <div class="content">It seems that XML-RPC is the right choice for your situation. That doesn't mean that I accept that REST is "ivory tower" because it requires an understanding of XML and HTTP. These are two technologies that most real network application developers already know and will need to know going into the future. The gist of your story is that the people consuming your application are not network application developers and do not need the extensibility, flexibility and XML-integration of the REST model. REST may be ivory tower-ish compared to XML-RPC as Visual Basic is ivory-towerish to the Excel "programmer" and Python to the Visual Basic programmer and Lisp to the Python programmer and Mercury to the Lisp programmer.

If XML-RPC solved 80% of the data integration problems out there, then I would agree that it would be ivory towerish to spend too much effort on the remaining 20%. But that is not true. Web Services have made such a miniscule impact in our day to day lives because they solve less than 20% of the integration problems they were supposed to solve (rough guess). Conversely, the Blog world would crash to a halt without REST (in its HTML,  RSS and Trackback incarnations).

For the 20% that XML-RPC solves, by all means use it! I have.</div>
            
        </li>
    
        </ul>
    
        </div>
