Forum OpenACS Q&A: Response to Chat and Push Technology

Collapse
Posted by Malte Fliedner on
Hi everybody,

We are actually working on an integration of the Jabber Server into the ACES right now, so I would like to introduce our approach and tell  you of our plans and the problems we are facing.
We decided to let the Jabber Server run separately and not directly implement the Jabber functionality in the Aol Web Server. Although the latter would make direct administration possible, we were not quite sure which additional problems and difficulties this would bring about and thought it was better to have the possibility to run the two servers on different machines.
So we want to “turn” the ACES into a client of the Jabber Server, which has all the users of the ACES as buddies in his roster.
This should just give you a brief description on how things are supposed to work:
When a User registers in the ACES for the first time he is asked for a Jabber screen-name (jid) and password which is stored in the ACES database and is then automatically registered with the jabber server. This is done by the ACES which simply logs in the Jabber Server with the new members jid and password. Registration (note: not authentication) can only be done by the ACES (we have to write a short mod for the jabber server which bounces all other reg requests from other clients). After this, an Applet (we are using a client from sourceforge.net at the moment) starts, which authenticates the user with the Jabber Server. This applet will handle the user communication for us (just like Aim Express) and will be started whenever a user of the ACES (someone who already has been registered) logs in.
Now, the ACES itself is always logged in the Jabber Server as a client and whenever a new User registers with the Server he is automatically added to the buddy list of the ACES. This makes it possible to track whether an ACES member is online with Jabber or not, as the presence information of all buddies is pushed to the ACES by the Jabber Server and can then be stored in the database for further processing. It also makes automated communication between the ACES and its Users possible, e.g. for announcements to all or groups of users or alerts. It is necessary that all Members have the ACES as buddy in there buddy list to receive the above described notifications (messages), we are working on making this buddy predefined and static (not removable).
We will probably use the group module (of Jabber) which has the capabilities that are necessary, but in fact it didn’t do what it was supposed to yet. It might just be a configuration problem, if not we will implement this functionality with a self written C module .

We already have implemented the Jabber XmlParser and libraries for the connection in the AOL Server. Furthermore we are using a library from EVERYBUDDY, which is a multi-protocol  C chat client, to add the client functionality.
The major problem we are facing is that Jabber does not provide an interface for remote admin. In the “Jabber World” only the clients themselves are supposed to be able to change their rosters. So if you want to be able to change users rosters by the ACES, this makes further effort necessary. One possible way would be to simply let the ACES log in the Jabber with the jid and password of the corresponding member, just like we do when we register clients for the first time. But the problem is, that the client could already be online with Jabber, which can lead to conflicts. Jabber provides the possibility to log in with different resources on the same account at the same time. So you should be able to login with another unique resource, do your roster changes and then log out again without disturbing the client.
On the other hand you could extend the Jabber Server functionality by own admin tags, which trigger the Server functions for roster changes etc.
We think both approaches have advantages and disadvantages, so we are still figuring out how, if at all, we want to proceed with this.
We have already managed to let the ACES log in the Jabber Server and should also be able to retrieve the presence information. But we had some trouble with the AOL Web Server (nothing to do with Jabber, probably) today, so we were not able to test it.
As we are, at the time, working on this project everyday we would appreciate any comments, notes, hints, questions or criticisms related to this topic.

Thanks,
                                Bjoern Kiesbye,
                                Malte Fliedner                                            Students of the University of Hamburg