Question about counters
Alex De la rosa
alex.rosa.box at gmail.com
Mon Jun 30 03:17:18 EDT 2014
A "set" may not be a good solution if you have many counters getting
updated at once and you should do the sorting (if possible) before saving
the "set" back into RIAK.
The goal scoring was a very simple/small example... but imagine you want to
do Twitter's Trending Topics counting which twits has more comments (if we
have a "comments" counter)... will be too massive to save it all in a "set".
I guess that MapReduce will be the way in this case.
On Mon, Jun 30, 2014 at 12:14 AM, Alexander Sicular <siculars at gmail.com>
> Not that I know of. I believe keys are independent in this regard. Basho
> is introducing sets in riak 2.0 but I don't think they will bee sorted sets
> like in redis.
> Sent from my iRotaryPhone
> On Jun 29, 2014, at 15:54, Alex De la rosa <alex.rosa.box at gmail.com>
> Hi there,
> I have a question about something that just came up to my mind... can we
> determine which counter is higher in a bucket? For example:
> # Taking the FIFA World Cup as example:
> bucket = client.bucket_type('counter_bucket').bucket('goals')
> counter = bucket.new('Neymar')
> counter = bucket.new('Messi')
> counter = bucket.new('JamesRodriguez')
> Is there any way (without using MapReduce) to get the top scorer of the
> World Cup? or a descendent ordered list of the keys by its value?
> riak-users mailing list
> riak-users at lists.basho.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the riak-users