Tuesday, July 7, 2009

Web services are easy; web systems are not

I've successfully built a web service!

It was easier than I expected. I leveraged my existing "source statistics" web application and created a new "page" that provides the statistics data in XML format. The PHP program for the web service is simpler than the PHP program for the standard web page, since it doesn't need the descriptive text and graphics.

I also created a small program to use the web service (the client program). I wrote it in Ruby. I picked that language for two reasons: I want more experience with Ruby and the examples in the RESTful Web Services book are in Ruby. The web service client program took longer than the web service, mostly for me to learn about parsing XML in Ruby.

Ruby has a very nice XML parser! The REXML library pulled in the XML document and let me iterate over the desired elements. After a little experimentation, I had the program I wanted.

The more I learn about web services, the more I understand the issues. Web services, by themselves, are easy. The difficult part is composing a system of web services. The higher level requires a good understanding of the low-level services available, plus an understanding of performance and scalability.

What tools and techniques are available to architects?

No comments:

Post a Comment