Development Considerations with Amazon E-Commerce Service (ECS)

General Considerations

A central tenet of Web services is the use of standardized protocols. By supporting this pervasive set of standards (SOAP and REST for initiating requests and XML for results, layered on a foundation of standard Internet protocols), Amazon.com reduces the amount of work that a developer must do to integrate with the Amazon Web sites and opens the door to the use of a wide variety of existing tools and toolkits.

An important and useful property of REST is the fact that you can use your web browser as a development and prototyping tool. Without writing any code, you can simply enter an ECS request URL into your browser, and hit the "Go" button (or equivalent) to make your request. The browser will make an HTTP GET request to the ECS server and display the result. If you are using Internet Explorer, the XML data returned by ECS is displayed in a convenient and readable outline form. You can expand and collapse logical sections of the data by clicking on the "+" and "-" symbols displayed to the left of the actual data.

As convenient as this is, this is only a first step. If you are building a server-based application using ECS, you will ultimately find yourself writing some code to make the request and to handle the results. The exact way to do this is of course dependent on your operating system and programming language. Fortunately, almost every operating system and programming language has the ability to issue an HTTP GET request and to parse (process) the results. Quite often these capabilities are provided as part of a "toolkit" or other add-on. Although space precludes an exhaustive treatment of this topic, here are some recommendations to get you started:

Language Get Parse
Perl LWP XML::Simple or XML::XPath
PHP PHP Interface to Curl PHP Interface to Expat
VB.Net, C# System.Net.WebRequest System.Xml.XmlTextReader
VB6 WinInet MSXML
Python urllib xmlparser
Java java.net.URLConnection JAXP

Static vs. Dynamic Data Pages

In order to fairly allocate access to all users, Amazon currently restricts ECS use to one call per second per client IP address. For most users, this is not a limiting factor. However you should consider your prospective use carefully before widespread deployment. For example, one developer created an application that integrated ECS' ability to retrieve CD cover art into their music application. However they retrieved this information live, and once the application was deployed on thousands of desktops, each with a collection of hundreds of music tracks, ECS was barraged with massive volumes of ECS request, far in excess of one per second.

Note also that your agreements with Amazon prohibit certain types of data being stored locally for long periods of time. Depending on your application, you may choose to mine extensive data at off-peak times to create static displays of commonly used data on your site or application, but such data must be refreshed periodically, esepecially volatile price data.

Before deploying a potentially high-volume application, you may want to chat with other developers on the chat board or consult with ECS Developer Relations staff to ensure that you do not exceed the development community's usage expectations.

Connecting with the Developer Community

To support developers, Amazon provides the following resources: