Riak java client mutation...

Guido Medina guido.medina at temetra.com
Sun Oct 14 08:15:24 EDT 2012


Hi Brian,

I know what you mean about 
https://github.com/basho/riak-java-client/issues/175 which by modifying 
the current *Mutation<T>* interface will break existing code, what about 
adding a *CriteriaMutation<T>* or *OptionalMutation<T>* interface that 
*extends* the *Mutation<T>* interface?

That way the current code won't break and you will be adding a real 
solution to the mutation inability of saying if the object was mutated 
or not, I strongly believe that the current withoutFetch...() is a 
workaround rather than a real solution and very prone to errors, it is 
more complex to work around the fetch, modify and store or not than just 
having a central logic inside the mutation that will just return true or 
false and let the Riak java client handle it.

At the Riak java client it will just require to ask *if (mutation 
instanceof CriteriaMutation) {...}* to determine if just proceed without 
asking if it was really mutated or not or just proceed. It will also 
help Riak clusters, it implies less writes which are expensive.

Regards,

Guido.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20121014/af214cc4/attachment.html>


More information about the riak-users mailing list