XML-RPC and New UPS

One of my current interests is the communication between machines for the purposes of solving a problem. Like having a 'calculation engine', or 'valuation server'... machines that did a non-GUI activity very fast and was available for anyone to use with a minimal of fuss. A few months ago I heard about XML-RPC and the more I read about it the more interested I became. I've always liked good, solid RPC designs - CORBA, RMI, but this is nice in that it has clients and servers for a host of languages - PHP, Perl, Tk, Python, C/C++, Java. These make it very easy to host on a platform that's just about anything you want, and have a client come in from just about anything.

This morning I decided to get into it a little more and picked up a PHP client/server implementation from Useful software that works fine on the PHP 4.03pl1 I have installed on sparky and barney. What I wanted to do was to set up a server on sparky and hit it from a client on barney.

The docs don't give you a lot of help here, but it doesn't take a lot to figure it out, either. Basically, you need to install the directory in a central location. I chose /usr/local/xmlrpc-php on sparky and /usr/xmlrpc-php on barney - these are reasonable defaults for Solaris and Irix, respectively. Then I edited the PHP files so the include() directives pointed to the installed directories. Finally, I linked the server.php file to my public_html directory on sparky and copied the client.php to my public_html directory on barney. I could then edit client to point to sparky and /~drbob/server.php.

At this point, I was able to go to barney and pull up http://barney/~drbob/client.php and it worked perfectly!. I couldn't have asked for a better result. The XML-RPC standard uses XML over HTTP, so it's a natural to have a server written in PHP. With all the capabilities PHP has, it's easy to see that any complex processing could be shelled out to any language and the only thing the PHP server needs to do is the basic interface. Very nice.

Now I'm in the neighborhood looking for a good project to use this on. One that comes to mind is the Quip Solver. It takes a cyphertext and a key and returns a plaintext. This would be OK, I suppose, but it's not exactly what I had in mind. Maybe I'll do it just for fun and practice... But I'm still looking for a better project.

Today I finally received the other half of my APC Smart-UPS 2000 that was supposed to arrive yesterday with the first half, but got lost on the truck and arrived today. After letting it sit for a few hours (as recommended by the docs), I moved it into place taking the 900VA UPS that was covering barney and putting it on wally. The 2kVA now covers tux and barney and is operating at a very low load. Excellent! It's nice to know that I can now put all three major machines on the net and have them protected nicely against outages.