RESTful Services versus SOAP or XML-RPC

February 15, 2009

The purpose of this blog posting is a quick review, for myself, on the differences and the advantages and disadvantages of RESTful services versus SOAP or XML-RPC. When is it appropriate to be using RESTful services? When is it appropriate to use SOAP? Well, if you are consuming web services, the answer is pretty simple: Use whichever is appropriate for the service being published. You don’t really have much of a choice in that situation.
The next two circumstances deserve a little more attention. First, when you are both producer and consumer of the webservice, and second, when you are the producer of the webservice for one or more outside entities, possibly the public. Now, which do you use? Well, here’s the basic rundown on each, for comparison’s sake.

REST (REpresentational State Transfer) – ie. the object is represented by the URL

1) On the plus side, it is SIMPLE, and so requires less handholding for outside entities to make use of it, and it does not require any special tools.
2) It is lightweight, so less code is required, typically, and smaller data transfers (less XML overhead)
3) The results are human readable, in most cases.
-) On the downside, it is not supported by Apache Axis 1.4, which is the version used in ColdFusion 7.

SOAP (Simple Object Access Protocol) or XML-RPC (Remote Procedure Calls):
1) It can be simple, if you have the right tools.
2) It is strongly typed and explicit, essentially establishing a contract between the client code and the service provider.

The REST approach was embraced by David H. and is highlighted in his keynotes on Ruby on Rails. The virtues of REST are touted by Dave Thomas, the Pragmatic Programmer, and others. It tends to be the favored approach for developers in Ruby on Rails, PHP, and a signature prescription for a Web 2.0 style web application.

SOAP is more “old school”, and tends to be the favored approach by Java developers.

A new driver for the SOAP versus REST pro-con discussion is the widespread emergence of mobile phones with internet capability. The assumptions about connections and bandwidth usually assigned to desktop computers do not necessarily apply to mobile phones. So, the lower overhead of a RESTful approach does contribute to the argument for using REST rather than SOAP.

Both sides have good arguments behind their use. In general, though, the trend is moving away from SOAP and XML-RPC toward the more RESTful approach, largely due to the successes it has brought sites that use REST. In an culture where there is a strong sentiment toward SOAP, likely the case in an old Java shop, it may not be the battle that you wish to engage in.

Maintaining a Windows XP System

February 6, 2009

This is low level general purpose stuff, which may be off-topic, but hopefully will prove useful to somebody. I have had to re-locate these sites a couple of times, so at least, they remain here as a reference for me.
My adventures began with the purchase of a notebook computer with SATA drives about a year ago. The first thing to note is that the notebook shipped with Windows Vista. I requested Windows XP Professional, because, at the time, ColdFusion was not supported on a Vista system. It was going to cost me extra to get Windows XP, I was told. And, indeed, as I searched on other sites selling systems, they included the option to “downgrade” to XP Professional from Windows Vista. This was just one indicator that Windows Vista was a horrible mistake on Microsoft’s part, something that they would not soon live down. Indeed, a year or so later, on the Dell site, they are offering the option to “downgrade” to XP Pro from the pre-installed Vista OS. It is not special order. It is a checkbox on the order, more than a year after the release of the Vista OS.

clipped from Ad on Dell Site Feb 6, 2009

clipped from Ad on Dell Site Feb 6, 2009

Not that XP is perfect. I wouldn’t be making a point of capturing these links (scroll to the end, they are there, I am sure), if it weren’t for one glaring oddity of the Windows XP installation procedure. The Windows XP standard installation disc (Service Pack 2), does not include support for SATA drive controllers. That’s okay, there is a way to add drivers during install, if there are mass storage drivers which are needed. The Windows XP installer will prompt you to insert the floppy disc containing the drivers into your floppy drive. Fantastic. My notebook doesn’t have a floppy drive. Most notebooks nowdays don’t come with a floppy drive. Well, I thought, no problem, I’ll just put the drivers on a USB drive, or burn them on a CD. The installation is reading off a CD, so it must be able to read from a CD, right??? Wrong. The only way to supply it with drivers mid-install, is via a floppy drive.
The only remaining solution is to add the drivers to the Windows XP installer *before* the install begins. Which means hacking the installer, somehow, or hoping some clever PC techno-whiz has pre-hacked it, and left some nice notes or better yet, some utilities to help with the process… Well, much to my pleasant surprise, the wizards of the world had been hard at work and had done that and more.
First, there is the BART PE site to create a bootable windows CD, or USB stick,
then, using that work is the Ultimate Boot CD for Windows(tm). a bootable Windows CD with a collection of utilities.
Each of these detail the process of Slipstreaming the drivers (and service packs) into the windows install, and provide utilities to assist with the task.
Going beyond the service packs, and including the hotfixes and some custom registry tweaks is Ryans VM.
For a fairly comprehensive set of drivers included in the install package, the driverpacks site is a great resource, and includes a utility to build an installer with (very likely) all the drivers you require.
And finally, for a great reference, the Windows Unattended Install (not unintended install) site is a great source of information.

Really, I hope to not need to refer back to this… but I am sure I will.