[LRUG] Question and answer service design using XMPP

Theo Cushion theo at jivatechnology.com
Mon Jun 29 06:47:32 PDT 2009


We are currently trying to develop a question and answer service using  
XMPP and are looking for some guidance - perhaps in the form of  
consultancy or a workshop. Given there has been a few talks about XMPP  
at LRUG we thought we would try here.

The idea is that a 'student' posts a question to a subject node, this  
question is then sent out to various 'tutors' who are subscribed to  
this node. When an appropriate tutor is found, the question is removed  
from the node

This of course fits the Pubsub mechanism very nicely. However, the  
'student' needs to see who is subscribed to the node, and who is  
online. MUC seems to fit this problem nicely. Someone enters a room,  
and then has access to other users presence, however MUC doesn't offer  
the same type of adding and removing of items.

We are currently solving this problem by using two Pubsub trees. One  
stores the subjects and has the questions as items. The other attempts  
to represent which tutors are subscribed to what. For example:

pubsub n subjects
         n maths
           i How is Pi calculated?
           i How do I calculate SD
         n physics
           i What is the speed of light?
       n tutors
         n maths
           i Charles Babbage
           i Blaise Pascal
           i Albert Einstein
         n physics
           i Aristotle
           i Albert Einstein

This is being maintained by a number of bots, but it doesn't take care  
of presence information which is currently being handled by a shared  
roster. This of course means all students receive the presence of all  
tutors, which is unnecessary (a student who has a maths question does  
not want the presence of a physics question). Multiple shared rosters  
could overcome this, but it feels messy. It also puts complexity onto  
the client, instead of packaging it up on the server.

Is it possible to do this using purely Pubsub, or are we asking too  
much? It seems to me that a hybrid of MUC and Pubsub best fits this  
problem, but that would carry of the overhead of coding up a  
completely fresh solution for something where all the parts already  
exist. How would you implement this?

Thanks

Theo



More information about the Chat mailing list