[rabbitmq-discuss] Exchange and queue design/best practices for social event updates

Lin Tun htinlinnhtun at gmail.com
Fri Mar 18 03:41:35 GMT 2011


Hi All,

I'm new to RabbitMQ and planning to use RabbitMQ in our social application.
Would like to receive more advices on design approaches and best practices
form you all.

The following is the basic requirements of our system:

The whole application is called community.  Inside community we have groups.
In each group, user can have discussion topics within the group.
User can share file/resource to community.
There is a wall page for user.  Also there is a wall page for the group.



(EVENT-1 :: if user share a file/resource to community)

- update on wall of that user

- update on wall of all friends

- add to moderation queue

*TARGET*: self, friends;

*ACTION*: update wall, add to moderation


(EVENT-2 :: if someone comments on shared file/resource of community)

- update on wall of that user (primary actor)

- update on wall of all other people (other actors) who also commented on
the resource

- update on wall of all friends of primary actor

- notify to all other people (other actors) who also commented on the
resource

*TARGET*: primary actor, friends, other actors;

*ACTION*: update wall, notify


(EVENT-3 :: admin delete particular file/resource from community)
- clean up work
- notify the owner
*TARGET*: owner
*ACTION*: clean up, notify


(EVENT-4 :: if user post a conversation to certain discussion topic within
the group)

- update to group wall

- update to group members' wall

- notify to all group members

- classify trending of the discussion

*TARGET*: group, group members

*ACTION*: update wall, notify, classify trending



This is my initial plan:

- planning to use *topic exchange* for that.

- use queues binding such as ( #.self , #.friends, #.group, #.groupmembers,
#.otheractors )


But my concern is:

-  how do we mix together the *TARGET* and *ACTION* so that one routing key
will cover all possible combination?

- do I require to send 2 messages with different routing keys to get the
possible combination?  (which I don't really want to since the publisher
will have too much knowledge about the business rule)

- Is it the right approach?  Or should I just have either of ACTION or
TARGET and have the consumer decide based on the event type?

- What is the recommended number of exchanges for such situation?

- Would be great if you could suggest the good naming practice for queue and
exchange.


OR if my approach is not appropriate, please kindly suggest the workaround
and fixes so that I could learn.


Thanks guys.

Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110317/0d60a51b/attachment.htm>


More information about the rabbitmq-discuss mailing list