Hi Luke,

Many thanks for your quick response.

Cheers,
Satya



On Tue, Feb 4, 2014 at 10:31 PM, Luke Bakken <lbak...@basho.com> wrote:

> Satya,
>
> In general, you always want to be querying Riak using a specific key value
> to retrieve or update a specific value. Following this guideline, method
> one is the correct data design. Please ensure that the default bucket
> properties apply to all of these buckets as you do not want to have any
> custom properties for such a large number of buckets.
>
> Method two will result in slow performance and most likely an object size
> exceeding the recommended 1MB value.
>
> --
> Luke Bakken
> CSE
> lbak...@basho.com
>
>
> On Tue, Feb 4, 2014 at 4:58 AM, Satya Ranjan <ranjansa...@gmail.com>wrote:
>
>> Hi Riak experts,
>>
>> I am designing a simple message box feature for a web application using
>> riak where an user can send messages to other registered users. So each
>> user will have a Inbox and Outbox just like an email system.
>>
>> Also users can search messages in their message box. Here I am providing
>> two different data model design. Could you please let me know if it makes
>> sense.
>>
>> 1)  Each user will have a separate bucket for their messages. So user u1
>> will have a bucket u1_messages and u2 will have u2_messages. All messages
>> for an user will be added to his/her bucket.  This will simplify search
>> operation as the search operation will only operate on user's bucket.
>>
>> With this approach there will be lot many buckets in riak. So for 10000
>> registered users, there will be 10000 buckets.
>>
>> So does this approach makes sense ? Is there any limitation or drawback
>> when there are too many buckets in riak ?
>>
>> 2) Common message bucket for all the users. The messages in the bucket
>> will be tagged with the user id. So one big bucket for all the messages.
>> Search operation will operate on that big bucket.
>>
>> Please suggest which of the above approach makes sense.  I would really
>> appreciate any help on this.
>>
>> Thanks for your help.
>>
>> Cheers,
>> Satya
>>
>>
>>
>>
>>
>> _______________________________________________
>> riak-users mailing list
>> riak-users@lists.basho.com
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>
>>
>
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to