Re: is there auto-increment functionality in riak??

2011-03-22 Thread Eric Moritz
I have been meaning to get familiar with Riak's allow_mult setting so I used this thread as an excuse to mess with it. I created a class in python call RiakCounter that stores a value into a key that makes conflict resolution easier when reading the value. Here's the code. I'm sure there's proba

Re: is there auto-increment functionality in riak??

2011-03-22 Thread Wilson Tuladhar
thank you all for the help. I will definitely try out redis and hope this will solve my problem :-) //Wilson On Tue, Mar 22, 2011 at 3:06 PM, matthew hawthorne wrote: > If you find a way to generate keys in this way, I'd also suggest that > you provide the "If-None-Match: *" HTTP header on your

Re: Multiple disks

2011-03-22 Thread Jeremiah Peschka
As an aside about RAID 10: If you have a decent RAID controller, you may get reads that are 2x as fast because the controller will read from both stripes at the same time. It's not just a redundancy issue: it's also fast. Like a cheetah. On meth. RAID 10 will really improve performance if you'r

Re: Multiple disks

2011-03-22 Thread Joseph Blomstedt
> Do the redundant writes still go to different physical nodes or just vnodes > that might be on the same host and fail at the same time? This is a standard riak question, and you can find a lot of good discussion if you search the mailing list. riak predominately operates at the vnode level, the

Re: Multiple disks

2011-03-22 Thread Les Mikesell
On 3/22/2011 11:54 AM, Joseph Blomstedt wrote: Let's consider a simple scenario under normal riak. The key concept here is to realize that riak's vnodes are completely independent, and that failure and partition ownership changes are handled through handoff alone. Let's say we have an 8-partiti

Re: Multiple disks

2011-03-22 Thread Greg Nelson
Thanks for all the responses! Regarding RAID 10, I think for now that's out because we can't afford to cut storage capacity in half when we're already using 2-3x for Riak level redundancy. And adding more redundancy at the RAID layer just seems... incorrect. Running multiple instances on each

Re: Multiple disks

2011-03-22 Thread Joseph Blomstedt
You're forgetting how awesome riak actually is. Given how riak is implemented, my patches should work without any operational headaches at all. Let me explain. First, there was the one issue from yesterday. My initial patch didn't reuse the same partition bitcask on the same node. I've fixed that

Re: Multiple disks

2011-03-22 Thread Alexander Sicular
Ya, my original message just highlighted the standard 0,1,5 that most people/hardware should know/be able to support. There are better options and 10 would be one of them. @siculars on twitter http://siculars.posterous.com Sent from my iPhone On Mar 22, 2011, at 8:43, Ryan Zezeski wrote:

Re: Multiple disks

2011-03-22 Thread Ryan Zezeski
On Tue, Mar 22, 2011 at 10:01 AM, Alexander Sicular wrote: > Save your ops dudes the headache and just use raid 5 and be done with it. > > Depending on the number of disks available I might even argue running software RAID 10 for better throughput and less chance of data loss (as long as you can

Re: is there auto-increment functionality in riak??

2011-03-22 Thread matthew hawthorne
If you find a way to generate keys in this way, I'd also suggest that you provide the "If-None-Match: *" HTTP header on your PUTs in order to detect the usage of duplicate keys. I'm not sure if there is something similar in the protobuffs interface. -matt On Tue, Mar 22, 2011 at 9:41 AM, Alexan

Re: Multiple disks

2011-03-22 Thread Alexander Sicular
This kinda thing is an operational nightmare. At the very least, I imagine, you are going to have to have symlinks on all your nodes for all your vnode/directories combos. How does this get managed in failure scenarios or when adding/removing nodes? Think about it a bit if you were to do th

Re: is there auto-increment functionality in riak??

2011-03-22 Thread Alexander Sicular
No there is not. Riak does not expose any data structures and is generally opaque to values. Check out redis or what Twitter is doing with Cassandra re. distributed counters. @siculars on twitter http://siculars.posterous.com Sent from my iPhone On Mar 22, 2011, at 2:37, Wilson Tuladhar

is there auto-increment functionality in riak??

2011-03-22 Thread Wilson Tuladhar
hi, I was wondering if there is some functionality to define the key such that it is auto-incremented during the insert process. If not, what may be the elegant solution to achieve this?? //Wilson ___ riak-users mailing list riak-users@lists.basho.com h

Re: Multiple disks

2011-03-22 Thread Joseph Blomstedt
Oh, I just realized that was only a partial solution to the problem. I forgot to commit related logic that handles selecting the same directory on vnode restart. That's what I get for sending out code late at night. You'll want to maintain a partition->directory index somewhere to really make it wo

Re: Multiple disks

2011-03-22 Thread Joseph Blomstedt
Each vnode already opens a separate bitcask, therefore there isn't any necessary factor preventing the desired behavior. It's just not coded that way. While an individual bitcask must be a single directory, there is no reason all vnodes need to open bitcasks within a shared root directory. Luckily