[rabbitmq-discuss] building chat
Ben Browitt
ben.browitt at gmail.com
Thu Aug 6 15:32:49 BST 2009
Hi,
I'm trying to understand how AMQP and RabbitMQ works by building a simple
chat.
>From reading the AMQP specs I get the impression that it's best usage is
when someone publish content to an exchange
and someone else bind his queue to this exchange to get updates. This model
works very well for publish-subscribe
and to finance systems but chat could be different. I read the xmpp gateway
docs and have some questions.
In a chat we want to be able to get presence from users on our friend-list,
send them messages
and send subscription request and messages to users not yet on our
friend-list.
One possibility is that each user will have an exchange and a queue with
binding to his own exchange.
When user1 wants to send a message to user2 he send it directly to the
exchange of user2.
There is a problem with presence updates. If user1 changes his presence,
he'll have to sends the update
to the exchange of all the users on his friend-list. With this design we
move the logic to the client rather then use the AMQP features.
Another option is that when a user logs in he'll create a binding to the
exchanges of all the users on his friend-list.
When user1 want to send a private message or a presence update to user2
he'll send it to his own exchange and it'll be directed to user2. The
problem with this design is that users without mutual presence subscription
can't send private message to each other and can't send subscription
requests.
Can you please share your thoughts on the two options and maybe other design
options?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20090806/58741b89/attachment.htm
More information about the rabbitmq-discuss
mailing list