Serialized SimpleDB requests
In the previous section, we used a batch operation for updating multiple items in a single call. This will work just fine as long as you only need to update up to 25 items at a time. What if you need to update 1000 items, or even 100,000 items? You can certainly use the simple batch operation, but making the requests one after the other serially will seriously degrade your performance and slow your application down. Here is a simple Python script that updates items by making three different calls to SimpleDB, but in a serial fashion, that is one call after another. You can run this script with the time command on Unix/Linux/Mac OS X to get the execution time. This will give us a baseline to look at when we convert this same script into using parallel operations.
Running this through time
on my laptop shows the following output:
Updated items for domain 'Domain:songs' to : {'112222222': {'Year': '2010'}, '6767969119': {'Genre': ''}}
Updated items for domain 'Domain...