[jdev] Minimising number of MUC rooms

Theo Cushion theo at jivatechnology.com
Mon Apr 30 15:17:12 UTC 2012

We use MUC rooms extensively within our site. They offer us a number of neat features that make them very useful. It gives us a central way to manage who talks to who, can accommodate groups of people chatting and gives us a neat way to deal with keeping a history of everything.

However we've started to see performance issues with using so many MUC rooms (we knew we would get stung by this eventually). Users who have had large quantities of chats need to log into a room for every conversation. We do this so that if a message is posted in one of these rooms, it gets pushed out to all of the recipients and we can then in realtime show "missed messages" (rooms they are not viewing, but are interested in). However, most rooms sit there totally unused.

Each use has a PEP node of rooms they are interested in, and when they log in to the site they get this list of rooms and join it.

The only solution I can think of is to have this PEP list updated so that only rooms which have more than one person in them are shown. The downside is I'm going to end up with a lot more logic hooked on for when people log in and out of the system.

How would you solve this?

More information about the JDev mailing list