Qunu
I always know when I get an email from Murray Gray, because he writes to me from the future.
QUNU - 2004: On making IM useful...
Instant Messaging has been around for ages, and almost everybody with a connected computer is using it. Over the past years IM has found its way into the corporate world, too, and it's been loathed as a waste of time and heralded as a productivity-enhancing tool all within the same breath. But up until now, it hasn't moved into its most potentially useful application: instant support.
Let's say you're stuck in GIMP with a layer problem or have issues installing a particular printer driver? What are the chances of you getting instant support from someone who knows their stuff and who actually wants to help? Pretty low. You could ask a buddy on your IM list, visit countless sites, forums or knowledge bases on the Net, or even go to the manufacturer's website. You may eventually find what you are looking for, but how long can it take sometimes to achieve resolution?
Now let's imagine an open IM system that allows you to connect immediately with the very person you need to talk to, who's online when you are, and who's passionate and knowledgeable in area you're having problems. Qunu makes this possible though an innovative cross-platform SDK that integrates with any software application as well as a fully-fledged standalone application.
- How it works -
In short, it's community helping community. Anyone can download the software and ask for help, and likewise, anyone can provide help. Experts can receive direct requests for help, or can dive into the pool of requests and help with issues in which they're knowledgable.
Software publishers and IT companies now have an incredible opportunity to allow their dedicated, passionate users to evangelize on their behalf, and an even greater opportunity to connect with users and solve problems before they end up as PR nightmares.
- The technology -
Proprietary, competing IM systems have meant that a project like this has been largely unfeasible up until this point. Because our raison d'tre involves community helping community, we have decided to base Qunu on two well established open platforms: XMPP/Jabber(1) and Mozilla(2).
XMPP/Jabber is a set of extensible XML streaming protocols approved as a standard by the IETF(3). The Jabber library is a very flexible event based framework, and protocol extensions can be added during runtime. The same code can be used as a client or component by simply changing the authentication mechanism.
Mozilla is a very sophisticated and portable application framework. While most people view it as just a suite of web applications, XUL(4) and XPCOM(5) actually provide a flexible and friendly environment in which to create powerful applications.
The core portability layer of Qunu is a thin wrapper around the Apache Portable Runtime (APR) (6), which has been released under the APL in the spirit of the libraries its directly built upon. The Jabber protocol then uses the APR wrapper for threads and networking portability. The XML parsing library that is used is Xerces-c XML parser(7) whose maturity and featureset are truly astounding.
- The automagic that is Qunu -
This brings us up to what you have been waiting for: the automagical way Qunu connects help-seekers with the experts they need to talk to. (To be fair, most of the magic comes from the beauty of Mozilla. We have just severely abused the tools which the community has provided.)
XBL Widgets There are several customized XBL widgets(8) that have been created specifically to make creating extensions and customizations easier. For example, if you want to start a chat with someone, all you need to do is insert an element named 'chat' into the window with the proper attributes:
This will create a fully fledged chat window with all the accessories one has come to expect in modern IM applications. In order to join a discussion room, group chat or MUC room (in Jabber parlance):
This will perform all the necessary actions for entering the room under the name "romeo"; sending presence, displaying forms if necessary, managing the room's roster, etc.
Browsing Disco The ability to quickly find relevant people to talk to is key to Qunu. There are several methods used to enable this; all revolve around the tried and true methods of browsing and searching. Service Discovery (disco)(9) and Data Forms (10) are the two JEPS used underneath.
Browsing topics with which people, discussion rooms, documents and any other resource available is organized under a disco node tree. As you have probably guessed, the XBL widget is called Disco:
This displays a list of topics organized in a hierarchical tree, the other display type available is 'grid'. It allows people to quickly browse topics and the resources which they contain. An optional attribute called 'node' can be used to constrain the scope to a specific resource.
The Jabber protocol and all extensions are based on XML. The Mozilla UI toolkit, XUL, is based on XML. Obviously, this tends towards a natural convergence: Qunu provides a mechanism to transform the forms described in the xdata extension to XUL widgets. This allows forms, both read-only data displays and interactive wizards, to be created on the server and pushed out to clients. This creates a means to change an application's behavior and utility on-the-fly without the need to update the local code.
< ###### note: i am still waiting for some code from justin for this section. hopefully it will arrive before your deadline. otherwise we can pull it out. ###### - Qunu's Push Me Pull You - While the featureset as it stands is useful, it would be even more useful to put Qunu in the background, forget about it, and let it do the work for you. Jabber not only provides well-behaved protocols, but also a solution in the form of the Publish-Subscribe JEP(11). Of course, Mozilla lays nicely on top with its observer service. All one has to do with Qunu is provide a string to the observer service in the form of a simple URI to subscribe to events. The native XPCOM implementation in Mozilla is useful for internal pubsub, but we need the request to get out into the network. Thus, we create our own observer service which implements the nsIObserverService interface: var notifier = /* create notifier object */ var pubusb = Components.classes["@qunu.com/pubsub-service;1"].getService(Components.inter faces.nsIObserverService); pubsub.addObserver(notifier, "xmpp:pubsub?jid=ps.qunu.com&node=linux"); Adding the observer to the service sends out a subscription request to the pubsub node. Any push out to the node (in the form of help requests, new documents and resources, etc...) is immediately received and directed to the observer, which can be any object implementing the nsIObserver interface. - In closing - Qunu is both a cross-platform SDK framework and stand-alone application, making it suitable for any type of implementation environment, software or topic area. For reasons of brevity, we have glossed over the details of setting up Jabber streams, creating XUL windows and handling events, but suffice it to say, the Mozilla application framework and Jabber protocols are complex and elegant and Qunu has leveraged this into a useful and extensible framework. We invite you to download the code and play, contibute, suggest and innovate. (A CVS will soon be available for developers who wish to contribute to the project.) We welcome developers and marketers to visit us at www.qunu.com, where you can follow the history and development of this remarkable application and framework. Qunu has its roots in an idea by BeOS user Joseph E. Trent on the (now defunct) BeNews forum in January 2000. This idea was picked up and personally financed by Helmar Rudolph (formerly of Opera Software and Sonork) and Murray Gray, and is being developed by Justin Kirby of openaether.org using his in-house toolkit for XMPP/Jabber development. - A Word on Licensing - Qunu is based heavily on free open source software projects. We have no desire to horde the fruits of open cooperation, so we have decided to dual-license under terms very similar to MySQL. A combination of GPL and commercial licensing that will enable us to give back to the communities that have given to us. ---- 1. http://www.jabber.org 2. http://www.mozilla.org 3. http://www.ietf.org and http://www.ietf.org/html.charters/xmpp-charter.html 4. http://www.mozilla.org/projects/xul/ http://xulplanet.mozdev.org 5. http://www.mozilla.org/projects/xpcom/