Instant messaging integration into the Desktop
vendredi 9 juin 2006 à 12:18 :: #14 :: rss
KDE4 is a good time to think more about Instant messaging integration into the Desktop. I'm writing this blog entry to help me and others to understand our needs and how we should proceed.
The desktop integration consits of several level:
- In the Address Book : It helps to manage instant messaging information with others personal info. and eventually allow to start a chat or know the online status in real time from the address book interface
- In the Mail client : It consist of showing the online status of the contact we viewing a mail, and add the possibility to reply with an instant message instead of by mail.
- In the File manager : It is the possibility to send a file to a contact easily from the file manager.
- Much others: Now Listening, Web Authentication, Playing games, Voice and video, ...
The first three case are those that interest me in this post. I'll explain how they are done in KDE3, and after I'll see some others approach
Current Status
Integration of presence is currently done with the help of a DCOP interface called KIMProxy.
Basically each contact is associated with an addressbook entry. That integration with the KDE address book is done with a shared library: KABC
If an application like KMail want to know if a particular contact is online, it will ask to each application that support KIMProxy if they know that contact, and will request his status thought DCOP functions. Same if it want to send a message.
Konqueror may also request the list of all contact that may receive file, and can give the KIMProxy compatible application an URL to send to a contact.
Notice there is no need of a daemon (just dcopserver), and it work with Kopete, but also with konversation, or all others IM application out of there that support KIMProxy, even if they are running in the same time
The Now Listening feature is done with a plugin which extract the song of some media player, most used media player are supported. There is currently no common DCOP interface to do that.
Telepathy
One of the problem of the KIMProxy is that it is not portable outside KDE, for the following reasons:
- It uses DCOP, which is reserved to KDE
- It require unique contact identifier, that are kabc contacts in the case of KDE
The first problem doesn't exist anymore in KDE4 since we switched to D-Bus, and the second problem could be solved with a common address book, or with dynamic identifier.
But guys of the others desktops have made their technology, namely telepathy
They have splitted everything in separate process, each communicating with D-Bus interfaces.
There is a global daemon, the Mission Control, which centralise and dispatch everything.
Their current implementation also involve a second daemon (galago) that i have not represented on the schema, but which could be placed between desktop applications (KMail, KAB) and the mission control. His role is to aggregate presence. KDE Application would not need it
I have made a comparison with both approach
| KIMProxy | Telepathy | |
|---|---|---|
| No daemon required | Require Daemons | Daemons are bad because of performance (everything need to be passed thought D-BUS) and they introduce unnecessary complexity |
| If a protocol crash, all Kopete crash | If one connection manager crash, everything else still works, and the broken process may be restarted | |
| The user need to change the whole client if he want to change the interface | The user may change the interface | But it is also possible to write interface plugin with Kopete |
| One need to code each protocol support | One can re-use connection manager of others client | We can use library anyway, and most protocol are already coded in Kopete |
| We just need to port Kopete to Qt4/KDE4 | We need to do important change in the design which almost consist of rewrite Kopete from scratch |
We could imagine an hybrid solution, in which Kopete would be both the mission control, the connection managers and the UI. In the same process. It would just export the telepathy interface that are equivalent to the KIMProxy ones.
There could be a "telepathy" protocol that connect with others connection managers. and a "telepathy" plugin that export Kopete as a connection manager
But this is just the KIMProxy model, with a telepathy compatibility layer.
XMPP
Let's now propose a new, probably very controversial idea.
This approach not very realistic as it, but can be combined with the above to get great results
It is based over XMPP, the Jabber protocol.
As you might know, unlike others protocol, Jabber let you make several connexion to the server.
So instead of having one connection shared with all applications, each applications connect to the XMPP server.
This can be done with a light library. Connections are possible without sending presence information, or downloading the roster. An application could use directly use the powerfull PubSub mechanism
So KMail and KAdressBook would connect to the Jabber server in order get presences. Amarok would connect the user tune, and Konqueror for the web authentication.
For starting chat with a contact, a XMPP URI could be used to open the chat window, exactly like mailto: URI start the email editor.
The main problem of that approach is that it would work only for jabber.
Fortunately, there are gateways. But gateway require to register to a Jabber account, even if one does not use Jabber.
I personally believe that Jabber is the only future protocol. So in the long term, I think this is a good approach
Several question need to be answered:
- How to share the account and password between applications ? Probably with the help of global config and KWallet
- What if the user has several Jabber accounts ? There is none Jabber-to-Jabber gateway yet
- Is a XMPP connection not too heavy for very simple tasks, even if they may be very light ?
So this model is maybe not realistic in the short term. But it is not incompatible with the previous ones, they can be implemented in the same time, or later, and be in use for some cases and not for others.







Commentaires
1. Commentaire de Duncan
Le vendredi 9 juin 2006 à 12:50
2. Commentaire de superstoned
Le vendredi 9 juin 2006 à 13:35
3. Commentaire de Gof
Le vendredi 9 juin 2006 à 13:53
4. Commentaire de Mario
Le vendredi 9 juin 2006 à 14:02
5. Commentaire de Bille
Le vendredi 9 juin 2006 à 14:02
6. Commentaire de liquidat
Le vendredi 9 juin 2006 à 15:32
7. Commentaire de Matt Rogers
Le vendredi 9 juin 2006 à 16:54
8. Commentaire de Chani
Le vendredi 9 juin 2006 à 17:09
9. Commentaire de Vlad
Le lundi 12 juin 2006 à 17:21
10. Commentaire de Rob Taylor
Le mardi 13 juin 2006 à 01:54
11. Commentaire de Snark
Le vendredi 16 juin 2006 à 19:32
12. Commentaire de idoric
Le samedi 17 juin 2006 à 11:47
13. Commentaire de sander
Le samedi 17 juin 2006 à 16:24
14. Commentaire de sd
Le samedi 17 juin 2006 à 17:22
15. Commentaire de -=RO=-tian
Le mercredi 26 juillet 2006 à 12:34
Ajouter un commentaire
Les commentaires pour ce billet sont fermés.