Consistent Read and Conditional Put / Delete announcement
Two key enhancements were announced on February 24, 2010 to SimpleDB: Consistent Read for getAttributes/Select
and Conditional Put/Delete.
ConsistentRead = true for getAttributes and Select
Consistent Read enables you to get the most recent values bypassing the eventual consistency system. Consistent Read should not be used as a way to bypass eventual consistency, but is very useful in counters and code where reading the most recent value is critical.
In the following PHP sample, we create an item with the date/time and immediately use a getAttributes
with ConsistentRead=true
, then a normal getAttributes
. The Consistent Read will return the just-updated value while the eventual consistency read will usually return the old value.
$sdb = new SimpleDB(awsAccessKey, awsSecretKey); // create connection $domain = "testread"; // Check that the domain exists $domainmd = $sdb->domainMetadata($domain); echo("Domain $domain Metadata requested...