Difference between riakc_obj and riak_object

2011-02-05 Thread Florian Odronitz
Hi All,

I am using the erlang protocol buffers client which uses riakc_obj to handle 
riak objects. As I understand riak uses riak_object internally.
Looking at the functions the modules look almost identical. Why is it done that 
way?

Thanks,
Florian

smime.p7s
Description: S/MIME cryptographic signature
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Maven Artifact for Java protocol Buffers

2011-02-05 Thread Mark Phillips
Hello Abhishek,

Sorry for the delay here.

On Tue, Feb 1, 2011 at 2:34 AM, Abhishek Kona  wrote:
> Hi
>
> Is there a maven artifact available for the Java protocol buffers
> (riak-java-pb-client) .
>

The latest release of the Java client (0.14) has protocol buffer
support and is available in the Sonatype Maven Repo.

https://oss.sonatype.org/index.html#nexus-search;quick~riak

Mark

___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Removing link from children to parent object

2011-02-05 Thread Joshua Partogi
Hi all,

I have a link between Parent object and Child objects
e.g:

Parent
-- Child1
-- Child2
-- Child3

Now when I delete Parent, I want the links from Child to Parent to be
removed as well.

I can traverse/loop through all the Children that Parent have and remove the
link one by one, but I was thinking if there is a more elegant way to do it
in Riak that I don't know.

I am using the Ruby Riak/Ripple library.

Thanks for your help.

Kind regards,
Joshua.

-- 
http://twitter.com/jpartogi
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Removing link from children to parent object

2011-02-05 Thread Alexander Sicular
Riak links are unidirectional and non-reciprocal. If you did not
explixitly set a link on the child to the parent then it does not
exist. If you did set links on the children then a traversal/loop will
work but remember to include the body (value) in the rewrite. Write
links + body or you lose the body.

-alexander

On 2011-02-06, Joshua Partogi  wrote:
> Hi all,
>
> I have a link between Parent object and Child objects
> e.g:
>
> Parent
> -- Child1
> -- Child2
> -- Child3
>
> Now when I delete Parent, I want the links from Child to Parent to be
> removed as well.
>
> I can traverse/loop through all the Children that Parent have and remove the
> link one by one, but I was thinking if there is a more elegant way to do it
> in Riak that I don't know.
>
> I am using the Ruby Riak/Ripple library.
>
> Thanks for your help.
>
> Kind regards,
> Joshua.
>
> --
> http://twitter.com/jpartogi
>

-- 
Sent from my mobile device

___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Removing link from children to parent object

2011-02-05 Thread Joshua Partogi
Thanks Alexander,

Is there any facility in riak that enables me to do something like this:

UPDATE obj set link=nil where link='Blah';

Kind regards,
Joshua

On Sun, Feb 6, 2011 at 5:51 PM, Alexander Sicular wrote:

> Riak links are unidirectional and non-reciprocal. If you did not
> explixitly set a link on the child to the parent then it does not
> exist. If you did set links on the children then a traversal/loop will
> work but remember to include the body (value) in the rewrite. Write
> links + body or you lose the body.
>
> -alexander
>
> On 2011-02-06, Joshua Partogi  wrote:
> > Hi all,
> >
> > I have a link between Parent object and Child objects
> > e.g:
> >
> > Parent
> > -- Child1
> > -- Child2
> > -- Child3
> >
> > Now when I delete Parent, I want the links from Child to Parent to be
> > removed as well.
> >
> > I can traverse/loop through all the Children that Parent have and remove
> the
> > link one by one, but I was thinking if there is a more elegant way to do
> it
> > in Riak that I don't know.
> >
> > I am using the Ruby Riak/Ripple library.
> >
> > Thanks for your help.
> >
> > Kind regards,
> > Joshua.
> >
> > --
> > http://twitter.com/jpartogi
> >
>
> --
> Sent from my mobile device
>



-- 
http://twitter.com/jpartogi
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com


Re: Removing link from children to parent object

2011-02-05 Thread Alexander Sicular
Oh hell no. But in practice that all depends on the client (you could  
theoretically have a client that understood some SQL dialect and  
translated it to riak speak). You would have to do an m/r to get a  
list of all keys that have that link (which hopefully you have already  
been maintaining) and then update each key individually.


But what you should really do is update your application to  
accommodate dead links. They will return 404 via http and you can  
update your m/r's to also skip non existent keys. Key management,  
which link management really boils down to is a bit of a beast in  
riak. Best left to other devices. I've said it before and I'll say it  
again: do key management in redis and periodically dump keys to riak.  
Mark and sweep is a good protocol for doing this stuff via a right  
proper queue stack... or redis.


-Alexander

@siculars on twitter
http://siculars.posterous.com

Sent from my iPhone

On Feb 6, 2011, at 2:01, Joshua Partogi  wrote:


Thanks Alexander,

Is there any facility in riak that enables me to do something like  
this:


UPDATE obj set link=nil where link='Blah';

Kind regards,
Joshua

On Sun, Feb 6, 2011 at 5:51 PM, Alexander Sicular  
 wrote:

Riak links are unidirectional and non-reciprocal. If you did not
explixitly set a link on the child to the parent then it does not
exist. If you did set links on the children then a traversal/loop will
work but remember to include the body (value) in the rewrite. Write
links + body or you lose the body.

-alexander

On 2011-02-06, Joshua Partogi  wrote:
> Hi all,
>
> I have a link between Parent object and Child objects
> e.g:
>
> Parent
> -- Child1
> -- Child2
> -- Child3
>
> Now when I delete Parent, I want the links from Child to Parent to  
be

> removed as well.
>
> I can traverse/loop through all the Children that Parent have and  
remove the
> link one by one, but I was thinking if there is a more elegant way  
to do it

> in Riak that I don't know.
>
> I am using the Ruby Riak/Ripple library.
>
> Thanks for your help.
>
> Kind regards,
> Joshua.
>
> --
> http://twitter.com/jpartogi
>

--
Sent from my mobile device



--
http://twitter.com/jpartogi
___
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com