Conversational Machines
Let’s jumpstart our web services discussion by looking at an actual web service—one from Amazon.com. Most of us have visited the Amazon.com web site, looking for books or CDs. We open a browser, enter a keyword, and scan the resultant display. For humans, this works fine—we’re visual creatures. But if want to write a program that parses the HTML (for example, to uncover publication date), things get tricky. It’s not obvious where among all the HTML display tags the desired data lives. Wouldn’t it be useful to get back all that Amazon.com information surrounded by XML tags? Well, that’s what Amazon Web Services (AWS) is all about.
AWS is an experimental service, open to developers who register and get a personal key to use when accessing the service. Rolled out in 2002, AWS supports a variety of services for tapping into Amazon.com databases. When you get your key, all you need to do is enter your request in a browser. AWS returns XML, and what you do with it is up to you. Amazon.com publishes a DTD that describes the content of the XML so you can parse, transform, and extract to your heart’s content. Experimenting with AWS is a great way to get a handle on web services, so let’s have a look.