Armon, 

The feature you are describing is very similar to the conditional header, 
`If-Unmodified-Since`, provided by the client APIs 
(http://wiki.basho.com/HTTP-Store-Object.html & 
http://wiki.basho.com/PBC-Store-Object.html).

Is this similar to what you're describing or am I missing something? 

-- 
Ian Plosker <[email protected]>
Developer Advocate
Basho Technologies


On Saturday, February 25, 2012 at 9:41 AM, Armon Dadgar wrote:

> As part of a new feature we are working on, we've run into
> a situation where it would be incredibly convenient to have a 
> check-and-set (CAS) API for Riak KV. In short, we are trying to build
> a unique index of a bucket, using a second bucket which acts as a 
> reverse index.
> 
> The CAS API would operate in the same manner as a PUT, except it
> should take a "last vclock". The new value + last vclock are submitted
> to the responsible vnodes. The vnodes respond if the last vclock
> for the key matches the specified last value. If we get "r" nodes responding
> that the last value matches, then we should commit the write. This method
> is basically a two-phase commit.
> 
> It would also be great if no-value sentinel could be specified to indicate
> the CAS should only succeed if there is not already a key. We need this
> to make sure uniqueness constraints are not violated.
> 
> I wanted to gauge the interest from the community in something like this,
> and see if I could get thoughts from the Basho team on if this could be
> implemented.
> 
> Best Regards,
> 
> Armon Dadgar
> 
> _______________________________________________
> riak-users mailing list
> [email protected] (mailto:[email protected])
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
> 
> 


_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to