My biggest wishlist item for S3 is the ability to enforce that an object is named with a name that matches its hash. (With a modern hash considered secure, not MD5 or SHA1, though it isn't supported for those either.) That would make it much easier to build content-addressible storage.
Amazon S3 Adds Put-If-Match (Compare-and-Swap)
21–30 of 166 posts
Re: Amazon S3 Adds Put-If-Match (Compare-and-Swap)
#22Re: Amazon S3 Adds Put-If-Match (Compare-and-Swap)
#23Earlier quoted context omitted.
I’d wager that the algorithm is slightly eager to throw a consistency error if it’s unable to verify across partitions. Since the caller is naturally ready for this error, it’s likely not a problem. So in short it’s the P :)
Shouldn't that be the A then? Since the network partition is still there but availability is non-guaranteed.
Re: Amazon S3 Adds Put-If-Match (Compare-and-Swap)
#24Re: Amazon S3 Adds Put-If-Match (Compare-and-Swap)
#25Re: Amazon S3 Adds Put-If-Match (Compare-and-Swap)
#26I feel dumb for asking this, but can someone explain why this is such a big deal? I’m not quite sure I am grokking it yet.
Re: Amazon S3 Adds Put-If-Match (Compare-and-Swap)
#27I feel dumb for asking this, but can someone explain why this is such a big deal? I’m not quite sure I am grokking it yet.
Re: Amazon S3 Adds Put-If-Match (Compare-and-Swap)
#28I feel dumb for asking this, but can someone explain why this is such a big deal? I’m not quite sure I am grokking it yet.
The short of it is that building a database on top of object storage has generally required a complicated, distributed system for consensus/metadata. CAS makes it possible to build these big data systems without any other dependencies. This is a win for simplicity and reliability.
Re: Amazon S3 Adds Put-If-Match (Compare-and-Swap)
#29I feel dumb for asking this, but can someone explain why this is such a big deal? I’m not quite sure I am grokking it yet.
As a (horribly inefficient, in case of non-trivial write contention) toy example, you could use S3 as a lock-free concurrent SQLite storage backend: Reads work as expected by fetching the entire database and satisfying the operation locally; writes work like this:
- Download the current database copy
- Perform your write locally
- Upload it back using "Put-If-Match" and the pre-edit copy as the matched object.
- If you get success, consider the transaction successful.
- If you get failure, go back to step 1 and try again.