Hi, we are trying use Riak as a storage layer for experimental higher-level data types updated by clients, using a set of well-defined operations. To this end, each data type instance is stored under a single key. One problem with this approach is that after client modifies even a small piece of the data structure, it needs to write (and transfer) the whole data structure back to Riak. We are looking for a way to reduce this overhead by sending just a delta operation, preferably without partitioning the data structure to several keys.
One approach we thought about is to perform operations on Riak-side using pre-commit hooks or similar technique. I.e. reconstruct the new value on Riak using original old value + delta send by client. The operations (deltas) we are talking about have necessary properties to ensure convergence. Still, it seems there a couple technical issues involved, we are looking how to solve them: 1) pre-commit API seems to only offer access to the object value passed by client during write and not the old value; I wonder - am I able to read the value from the store in pre-commit hook? In particular, the value previously read by the client writing, identified by version vector? 2) pre-commit hooks are executed on the coordinator node; is there an easy way in Riak to apply operations at data nodes instead? Thanks for any info that can help addressing these issues. Regards, Marek Zawirski _______________________________________________ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com