We had a similar use-case and implemented it with Redis. Using Redis
lists for each chat room and its messages. The "chat room" which was
just a key would naturally expire after it wasnt being used, much like
how a beanstalkd tube disappears where there are no more messages.

Could be an option for you too.

/Cody

On Wed, Nov 24, 2010 at 7:48 AM,  <[email protected]> wrote:
> We plan to use it as a means for delivering chat room messages.
> We have 2000 different chat rooms, and several message are created for each
> chat room per sec.
> If we use just one tube for all those messages, 2000 - 6000 messages/sec
> will be sent(by multiple processes/threads) to a single tube.
> On the consuming end, we can't process that many messages per sec.
>
> If consuming rate is less than providing rate, the messages will build up in
> the queue and
> eventually queue will blow up.
>
> As a solution we plan to create a tube for each room, i.e, total 2000 tubes,
> with one consumer process for each tube.
> This way each consumer process will need only process 1-3 messages/sec
> which is reasonable.
>
>
>
>
> In a message dated 11/22/2010 5:24:58 A.M. Eastern Standard Time,
> [email protected] writes:
>
> why do you need thousands of tubes? will it not be good to maintain
> tubes w.r.t functionality?
>
> /A
>
> On Nov 19, 4:02 am, "[email protected]" <[email protected]> wrote:
>> On Thu, Nov 18, 2010 at 11:10 AM, wonmuhur7 <[email protected]> wrote:
>> > Can beanstalkd maintain this many tubes concurrently?
>>
>> Yes, but there are some O(n) behaviors with respect to the number of
>> tubes. Several thousand is a fairly small number; it should still be
>> reasonably fast.
>>
>> If you decide it's not fast enough, be sure to let me know. There is a
>> lot of room for further optimization.
>>
>> > Also are tubes deleted automatically if not used for a while?
>>
>> A tube is deleted immediately when it is empty and not referenced.
>> Otherwise it will continue to exist.
>>
>> kr
>
> --
> You received this message because you are subscribed to the Google Groups
> "beanstalk-talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/beanstalk-talk?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "beanstalk-talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/beanstalk-talk?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"beanstalk-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/beanstalk-talk?hl=en.

Reply via email to