Sumana Harihareswara provides a novice’s introduction to Telepathy, covering its goals, a guide to its architecture, platforms that use it, its future, and how to dive in.
It’s convenient to have a unified interface to different chat services & protocols: XMPP, MSN, Google Talk, AOL Instant Messenger, Bonjour Chat…. You may not think this is related, but when I want to work with someone on a document and we’re at different computers, it would be great to use my regular word processor, instead of having to load up a web browser with Google Docs. And I’d love to get to send cell phone text messages (SMS) in the same application with my other chats.
These are all aspects of real-time communication, and the Telepathy real-time communications framework is aiming to solve all these problems.
Pervasive real-time communication
The Telepathy project aims to give desktop applications (such as word processors, CAD programs, games, and jukeboxes) a way to painlessly integrate chat, SMS, and VoIP (voice over IP) telephony features. It’s a Freedesktop project, and it’s enabling new functionality on the desktop and on embedded devices.
Telepathy’s developers hope programmers will use Telepathy to improve your computer and cell phone and get rid of the annoyances I mentioned above, and create neat applications and services. Empathy is probably the most prominent Telepathy-based application. GNOME 2.28, Fedora 12, and Ubuntu 9.10 are shipping, or will ship, Empathy as their default chat program, giving developers on all those platforms access to the Telepathy framework.
I’ll give a brief overview of Telepathy, Empathy, and what they mean for you.
Here’s one way of viewing the Telepathy framework. It has three essential parts:
- a bunch of Connection Managers. Each handles the interaction with a protocol or set of protocols (such as XMPP, Google Talk, AOL Instant Messenger, and MSN).
- Mission Control, managing accounts and channels. For more details, see Danielle Madeley’s article, Telepathy, Empathy and Mission Control 5 in GNOME 2.28, in this issue
- the specification, telling all the parts how to interact via D-Bus
This design gives Telepathy a lot of flexibility. If a new interesting service comes along, like Facebook chat, we (or you!) can just write a new Connection Manager for it and bam, anything that uses Telepathy can now interact with it. Who knows what other interesting collaboration or communication networks might hook into Telepathy someday? (Sure, it would be nice if everyone just used XMPP. But users use a zillion different networks for voice/video/text chat, and won’t be stopping anytime soon. So it’s lovely to have an abstraction that provides developers and users with the features they need, so you don’t *have* to worry about the underlying communications network.)
D-Bus, Tubes, and wormholes
Another important aspect of Telepathy’s architecture that it’s built on D-Bus, the infrastructure that lets applications, frameworks, and low-level system components talk to each other. Telepathy Tubes takes advantage of this by enabling programs on different computers to talk to each other in terms of D-Bus. Prior to Tubes, the standardized D-Bus API was only useful inside a desktop session, so that one user’s desktop applications could talk to each other. As Telepathy developer Dafydd Harries explains:
Tubes come in two flavours: one looks like TCP, the other one is D-Bus. What D-Bus tubes do is make it so that programs on different computers can talk D-Bus to each other. So the D-Bus part is working on two levels. First, you use D-Bus to talk to the thing that gives you the tube. And then you use it to talk to the thing on the other end of the tube, once you’ve set it up….With Tubes, my copy of program X doesn’t need to care about the details of how it’s going to talk to your copy of program X.
So Tubes can act like a wormhole, not just between two different people’s computers, but between unassuming regular old apps on their desktops. For example, Tubes helped One Laptop Per Child get collaborative activities on the XO. On Sugar, you and a friend can collaborate on writing a paper together right in your word processor, or play a game against each other—without having to deal with a slow, limited web app in a web browser. One Google Summer of Code student used Telepathy to make Sudoku multiplayer. And in GNOME 2.28, Empathy makes it easy to share your screen via VNC. Check out Telepathy developer Guillaume Desmottes’s Gran Canaria Desktop Summit talk on how to use Tubes and Telepathy to make GNOME a more collaborative desktop.
Ripples in the ocean of mobile
Even regular folks who have never heard of GNOME are getting the benefit of Telepathy with (for example) the new N900 smartphone. One example is in the addressbook—it combines the different ways you can contact a person on the same screen (such as XMPP, SMS, Skype calls, GSM calls, etc), instead of forcing different flows for different ways of contacting people.
(Image copyright Marco Barisione)
Moblin, another Linux-based open source OS for mobile, also makes use of Telepathy for contacts integration. Empathy is the default chat client in Moblin, and Telepathy empowers its people panel integration.
Looking to the Future
The connection managers provide support for several protocols, with some managers more stable and featureful than others. I’d especially watch the improvement of telepathy-haze (based on Pidgin’s libpurple), telepathy-butterfly for MSN, and telepathy-yafono for SMS and other wireless modem functionality. yafono promises to bring functionality outside of the normal chat and VoIP stuff, so it’s fairly exciting.
GNOME Zeitgeist, with its focus on pervasive search and integration, could be a great framework for sharing ambient information and workflow—lightweight collaboration with faraway teammates. In development within Zeitgeist is Teamgeist, which would add to Zeitgeist the ability to share certain data and events with teammates via Telepathy Tubes and Multi-User Chat. Teamgeist is in the early design and implementation stages, but it’s clear that Telepathy will give Zeitgeist an easy way to plug into real-time communication functionality.
But why should GNOME get all the good stuff? (I know, I know, this is GNOME Journal, but there’s no need to get parochial.) KDE is getting in on the Telepathy action to get a unified messaging and voice/video framework throughout the desktop, and to add collaborative features to KDE applications. The NEPOMUK folks seem especially interested in ensuring that KDE’s use of Telepathy deals with metadata and metacontacts in a well-designed way.
How to dive in
Telepathy has a reference manual, a system overview, a mailing list, a wiki, and of course an IRC channel (#telepathy on Freenode). Empathy developers also use the Telepathy mailing list, and help users on #empathy on GIMPNet.
The Zeitgeist team hangs out on #zeitgeist on Freenode.
The Telepathy-in-KDE project’s in progress, so if you’re interested in Telepathy and want to dip your toe in KDE’s waters, check out the Telepathy Junior Jobs available for novice KDE developers.
And of course you’re welcome to join us in testing, documentation, development, packaging, and everything else.
About the Author
Sumana Harihareswara is a manager at Collabora, Ltd., which works rather a lot on Telepathy. She contributes to the project primarily via documentation, advice on IRC, bug triage, and nagging. Sumana has been using FLOSS for eleven years and evangelizes more than is good for her, including at her blog at http://harihareswara.net.