Moving mapred* functions out of riak_client?

Bryan Fink bryan at
Mon Jun 13 15:40:34 EDT 2011

On Fri, Jun 10, 2011 at 11:18 AM, Kresten Krab Thorup <krab at> wrote:
> We are using those APIs in our new stuff for riak sync/mobile. My problem with your change would be that we have a mock riak_client which is super convenient for unit testing, and it would be good to still be able to have that somehow.  Our mock is just an eta-backed parameterized module which has put/get/mapred_bucket/etc. ....

Hi, Kresten.  I can see how unit tests like you describe could be more
challenging with the breakup I proposed.

In case the link isn't obvious now, this is the driver behind my
desire to move things around (Riak Pipe):

My main thought was that keeping all of the code separate, right up to
the external interface layer, would reduce confusion during any
transition from the legacy system to the pipe-based system.

Would you mind taking a look at the changes I was thinking about to
support this inside Riak?  I have a branch + [unreviewed] pull request
going here:

Or if I could take a look at your mock system, maybe I could help with
some suggestions for moving in the direction I proposed?  We are
generally trying to move toward more well-defined APIs (such as
PBC/HTTP) and to discourage people from using distributed Erlang to
interact with Riak.


More information about the riak-users mailing list