0

For the sake of simplicity, assume I have a chat like system - it's 1 to 1 communication (can be between 1 sender and 1 receiver). Senders and receivers. I want to use an MQ flavour (probably beanstalk) to send messages from one user to another. The messages are very small, but given the number of users of twitter, there are many of them and possibly messages are produced often. I'm using this in C#.

How many channels/queues to create?

My first thought was to use 1 channel per communication (b/w 2 users), but that means millions of channels open-lots of opening and closing of channels. Perhaps there is a way to re use idle channels instead of closing them. Would that be a better thing to do?

Is there a better way to do this communication?

Thanks :)


EDIT:

Since I got no replies, I decided to post my untested design here and maybe we can use it as starter:

Each receiver client has a unique ID thus they can each open a tube with their ID name. The sender, whenever it has something to send to a client, it opens a tube/queue with destination ID as the tube's name. Sends the message. Then discards the tube.

While theoretically this seems to work, this whole closing and re-opening is bothersome.

Adrian
  • 5,603
  • 8
  • 53
  • 85
  • Twitter is probably a bad example- it doesn't have point-to-point communication. I post a tweet and anyone can read it. Do you mean something more like an instant messenger? – Chris Shain May 22 '12 at 16:49
  • @ChrisShain yes you are right, a messenger would work. I'll make the edit – Adrian May 22 '12 at 17:02
  • @Adrian I stumbled on this question because I wonder what the limits of the typical MQ implementations are. What is the highest number of channels/queues you have tested yet? – user694971 Jan 09 '13 at 14:39
  • 1
    @user694971 I remember trying over 40,000 and it was fine. However I think the architecture was changed from what this post says. I'm still curious to hear what others did. – Adrian Jan 12 '13 at 00:24

0 Answers0