On Saturday, October 29, 2011 08:42:52 AM Jeremiah Peschka wrote:
> 1) Use an RDBMS. Since you're here, I'm guessing that you're already using
> Riak or else that Riak has qualities that you want for your application.

Right.  This is early on in the app's lifetime and the data storage is not 
terribly complicated.  I just need some parent/child relationships and when I 
saw the Links feature I figured this was an expected usage of Riak.

> 2) As Alex suggests, you can implement this in your application.

Yes, this I am ready for.  As I understand it, using Riak successfully 
generally means designing your application with its limitations in mind.  So, 
let's go write some funky app code!

> This could also be difficult: the application must be aware of activity going
> on with objects in your database AND be able to roll them back. In
> pseudocode you'd do this:
>
> orig = Riak.get('whatevs')
> child = new Child(orig)
> 
> 
> if Riak.put(child)
>   if !Riak.link(orig, child)
>     Riak.delete(child)
>     // error up the stack
> else
>   // we don't care, the child didn't save. error up the stack
> 
> This is probably naive and is definitely tedious, even if you do implement
> your own application layer to handle read/write operations.

See, to me, this looks exactly like what you're supposed to do.  How is it 
naive and tedious?  I would assume that everyone writing a serious app with 
Riak has to do things like this.

Justin

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

Reply via email to