On Jan 28, 2012, at 11:20 AM, Sean Cribbs wrote: > Jeremey, > > Alin is correct, the PB client is canonical (but there's also > https://github.com/basho/riak-erlang-http-client ). Were you specifically > having trouble with the internal representation (riak_object) leaking into > the client via MapReduce? It should be straightforward to address that issue.
Yep, that's my issue. My use case is this: I need to fetch all the objects in a secondary index, and it would be more efficient for me (due to later operations) to fetch the complete riak objects (i.e. using map_identity) rather than the just values only (using map_object_value). However, map_identity returns riak_objects and I gather (but haven't dug deeply) that the whole erlang binary is then stuffed into PB, rather than individually encoding each object in PB and then decoding into riakc_objs on the client. At least, that's what I assume is going on, more or less. That may be workable behavior for getting a list of values, but if I'm getting the riak objects themselves, it's broken. Seems like there needs to be a mechanism to transport mapreduce results in the same protocol encoding (PB) as with a get, so that the client gets back a list of riakc_objs. For the moment, I suppose a map_pb_identity function would suffice, but that seems like the wrong general solution. But perhaps not. Regards, Jeremey. _______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
