Parallelizing SimpleDB requests
We can take advantage of the excellent support for concurrency available in SimpleDB by parallelizing our batch requests by multi-threading or using multiple processes to make requests in parallel. There are several different ways of parallelizing our requests using Python. We will look at the different ways of doing this in Python. We will be using the batch operation as an example to illustrate each threading example, but you can apply these principles with any of the SimpleDB operations:
Inserting items
Deleting items
Updating items
Parallelizing SimpleDB requests in Java
Java provides excellent support within the language for running operations concurrently. In this section, we will use the java.util.concurrent
package to see how easy it is to insert multiple items concurrently into SimpleDB by using a threadpool
. Recent versions of Java provide a ThreadPoolExecutor
class that has all of the functionality that we need for our purpose. We will first instantiate...