Hi Russell,

Thanks for the response. Pardon my tardiness in responding, I've had lots of
fun at home with sick kids of late.

Responses inline.

On 28 April 2011 16:46, Russell Brown <[email protected]> wrote:

> Hi OJ!
>
> I'm just working through this myself at the moment as I'm trying to make
> the Java PB client behave the same way as the REST client .
>
> On 28 Apr 2011, at 04:23, OJ Reeves wrote:
>
> So my question: Is this how link walking should work when using the PBC? Or
> is there some way of getting the PBC to return the content at the same time
> as doing the link walking?
>
>
> I asked yesterday and the answer I received was: no.
>

Cool, so I'm not barking mad then! Excellent :) Did you get any feedback as
to whether or not there would be future work done to enable this?


>
>
> In practice, what I have it a relationship between three entities (*a*, *b
> * and *c*) that live in different buckets (*A*, *B* and *C*). *a* has a
> link to *b*, and *b* has a link to *c*. What I want to do is walk from *a*to
> *c* while taking the following information:
>
>    - The value stored in *a*.
>    - The key of *b* and, if *b* still exists in *B*, the value stored in *
>    b*, otherwise nothing/false/failure.
>    - The key of *c* and an indication of whether *c* currently exists in *
>    C*.
>
> Currently I link walk and do each step manually and I was wondering if
> there was a better or more optimal way of performing these actions.
>
>
> At the moment the plan is running an initial m/r job for the link phases
> then making a second m/r job with all the intermediate results as inputs. So
> maximum 2 jobs is my target.
>
> I should think this is a common problem so if you come up with an optimal
> solution you'll make a few friends!
>

Off the top of my head with the current implementation I can't see how you
would do this any better. In fact, for link walks where the levels > 2 this
is really the only option (IMHO). For 2 levels or less you can easily fetch
based on ID and you end up with the data faster with the same number of
calls.

I will think about it a bit more and see what I can come up with (as soon as
this sickness clears!).


>
> How do you satisfy your requirement with the REST link walker? Specifically
> how do you get the value of *a* returned as part of the result?
>

With the REST link walker I'm not able to do this, so I have to make another
call to get to this info. It'd be nice if the link walking mechanism also
had a flag that said "please give me the link source value too". I realise
that might be pie in the sky though :)

Cheers mate, thanks for the response.
OJ
_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to