We discussed Brewerâ€™s Theorm a few days ago and how its challenging to obtain Consistency, Availability and Partition tolerance in any distributed system. We also discussed that many of the distributed datastores allow CAP to be tweaked to attain certain operational goals.
Amazon SimpleDB, which was released as an â€œEventually Consistentâ€ datastore, today launched a few features to do just that.
- Consistent reads: Select and GetAttributes request now include an optional Boolean flag â€œConsistentReadâ€ which requests datastore to return consistent results only. If you have noticed scenarios where read right after a write returned an old value, it shouldnâ€™t happen anymore.
- Conditional put/puts, delete/deletes : By providing â€œconditionsâ€ in the form of a key/value pair SimpleDB can now conditionally execute/discard an operation. This might look like a minor feature, but can go a long way in providing reliable datastore operations.
Even though SimpleDB now enables operations that support a stronger consistency model, under the covers SimpleDB remains the same highly-scalable, highly-available, and highly durable structured data store. Even under extreme failure scenarios, such as complete datacenter failures, SimpleDB is architected to continue to operate reliably. However when one of these extreme failure conditions occurs it may be that the stronger consistency options are briefly not available while the software reorganizes itself to ensure that it can provide strong consistency. Under those conditions the default, eventually consistent read will remain available to use.