Galago

Emotional Presence

I’ve been toying around with an idea for some time now for a form of emotional presence. The idea being that not only can you tell somebody’s active state, but how they’re feeling. This would conceptually be integrated into instant messengers (although no protocol that I know of supports such a thing currently), and of course Galago would supply the info as well.

So say you decide you want to talk to somebody on your buddy list. Before sending him/her a message, you can check on the buddy’s emotional presence. Then you can make an estimate as to whether or not the person is in a good mood, bad mood, ready to kill someone, contemplating, horny, etc.

The best way to convey such information is by using an eye. The eye is our best way of judging a person’s response, so why not? Smilies could work, but that’s just not good enough. Now, there are a couple of ways to do this. The easiest way is to let the user just set his/her emotional state in the instant messenger like they would an away message. This, like away messages, would just come naturally to some people over time, but others wouldn’t think about it.

Another way of doing it is to have a camera and some face recognition software going that can scan the guy, take a little snapshot, and display it. This is obviously not going to work for everybody, and is a bit more work. This is all just concept stuff right now, though, so implementation is something we can put off just a bit.

I’m sure many of us know people who never use any form of smiley/emoticon during a conversation. They often seem almost machine-like, or perhaps not in a good mood, even if they’re feeling on top of the world. Emotional presence during a conversation could help to fix this. Even if the person showed no emotion in his/her text, the eyes would paint a different picture.

Of course, as someone said, not everyone would want to see a big eyeball on their desktop. Depending on the implementation, this could be changed to text, or a smiley, or hidden altogether.

Oh yeah, and DanielS just put the new Planet Freedesktop.org site up with my new layout. Woo!

Moving On

Life took a bit of a turn for the worse recently, relationship-wise. My now ex-girlfriend, whom I cared deeply for, and I broke up, and it ended pretty badly. So, it’s time to move on, find someone who perhaps is more compatible, and get some code written again.

Gaim’s status rewrite is now moving along well, aside from the past few days, when I’ve just been dealing with the aforementioned issues. I still don’t have a definite ETA for completion, but the core code is now mostly there. It likely won’t be able to do some of the really complex status combinations people wanted, but that can be done through a second layer (as it should). Anything more complex than what it currently is would require a really complex API, and none of us wants that.

Galago has been moved to SVN over on freedesktop.org, and I’ll likely get a page up soonish, after tests and other responsibilities. After I figure out a couple of design issues, support for presence feed capabilities will go in, and the work on Evolution’s Galago support will be nearly finished.

Sometime this week, I plan on finishing up a bug fix for Gaim for Qtopia and releasing 0.5. It’s long overdue, and people are waiting for some of the fixes to go in.

Just got to get my motivation back after the break-up. Metroid Prime is also sucking up my time, but that’s probably not a bad thing right now.

Reasons for Galago’s Design

I have received several criticisms regarding my design for Galago, most of which I believe to be misunderstandings as to what the eventual goals are. Unfortunately, such misunderstandings and criticisms are now leading to duplicated effort, something which really is not needed.

First off, Galago does require a daemon running in the background, though it’s not something that users are going to have to deal with, so that shouldn’t be a major problem. The main question I have received is, why use a daemon? Why not just have everything listen on the interfaces in D-BUS?

A couple of people have suggested that a daemon is pointless and serves no value. Originally, my design for Galago did not include a daemon. Everything would simply listen on the interfaces and report back. This design proved to be flawed, however. Let me start off with an example.

Say you’re using Gaim to provide feed information, and then you start up a program that uses Galago to receive presence information. Every time you open up a window on this program (let’s pretend it’s something with an address book), the Galago-Gtk widgets are given information on what user’s presence should be monitored. Of course, since it’s just monitoring for new presence updates, it doesn’t have anything currently set. So, each widget makes a query to receive the current presence information.

Now, Gaim had already pushed presence for these users before. As a Galago feed, Gaim is able to push presence when a user’s presence changes, which is quite quick, or it search through the buddy list and build a presence list when specifically polled. The polling is what these widgets have to do to receive initial status. You wouldn’t want to just have them wait with no active presence information until someone signs on/off or sets away.

So, back to our address book. Each widget queries for presence. In a design with no daemon, each feed would receive the poll and send back a response. This could be a lengthy operation, depending on the program feeding presence, or it could be quick. Either way, each feed is going to have to send the presence again.

With a design requiring a daemon, that information has already been pushed and cached. When the widgets in the address book poll for the current presence for a user, the daemon will simply return what it has stored. This is much faster and doesn’t require re-polling every program. It’s also smarter, as it can determine which to poll based on the registration time of a feed (more on that in a second), instead of polling every single program every time.

One person pointed out that you wouldn’t be running Gaim and Kopete at the same time. This, however, is not always true. I know of people who run Gaim and AMSN at the same time, and those who run Kopete and AMSN. Regardless, this particular point wasn’t well thought-out. Not only instant messaging programs provide presence. IRC programs, Gnomemeeting, and other collaboration software.. heck, even a program feeding presence for users logged in to the computer can all provide presence at once. I try not to limit my designs to “what do I need right now, I can always expand it later!” That’s a bad design method, imho.

There are more reasons for the daemon requirements. Feeds will soon be registering themselves when created. It’s something that the developers using the API won’t have to really see or touch. The libraries handle it. Registration simply registers the feed with an ID, descriptive name, and a couple other small pieces of information. This allows the daemon to keep a list of what feeds are available, which can be polled, which can push, their sign-on times and last active times, and actions (sending a message, for instance). Any program can query for a list of applications providing presence, and display them in something like a drop-down protocol box.

Avatars will soon be able to be sent along with presence. This is something else that the daemon can cache, though that may be an option in a preferences file, not that many people would need to modify it. The idea is to have such items expire so that memory is not taken up by unnecessary items. This does require a re-poll from time to time, but it’s considerably less work than polling every feed every time we want to display something.

Finally, Galago is not an instant messaging platform. It is for presence, which instant messaging programs can use or provide if they choose. It is not limited to instant messaging programs either, as I mentioned above. I find it unfortunate that a duplicated effort is going on when the two really should work with each other, but that’s the beauty of open source.

Galago-Gtk#, Freedesktop.org

I spent part of the day working on Mono bindings for Galago-Gtk. I now have running a C# version of the Icon Entry test that was in the previous entry. Later, I’ll write bindings for libgalago itself. What’s nice is that this will allow me to prototype much faster. I’m hoping to get someone to do Python bindings. I may handle Ruby myself. Of course, there’s no rush, as the whole system needs to be developed further.

Just a short while ago, Daniel Stone was nice enough to setup a CVS account on freedesktop.org for Galago. It no longer has to run off my slow little CVS server here. I’ll soon get a page up and people can start playing with it.

I’m playing around with the idea of creating a little applet that displays presence info for selected user(s). I don’t know if there would be an icon per person, or one icon with a drop-down. If the later, whichever person is selected on the drop-down will be the new entry on the applet. I’d personally find it useful, and it would be a good little real-world test of Galago.

Galago Status – Widgets and Avatars

The past two days, I have been hacking on a new Gtk widget that will be included in libgalago-gtk. It’s a nice little subclass of a GtkEntry that includes an embedded icon, as shown below:

GalagoGtkEntry screenshot

It has a lot of work to go, but so far it’s rather nice.

Avatar development has just begun in libgalago. Avatars, aka Buddy Icons or That Little Picture of Me will be able to be pushed and received just like presence information. This is untested, but should be working by tomorrow, along with a little Gtk widget for easily displaying them.

I think the next trick is to write a general GalagoConnection API that wraps DBusConnection and allows feeds and watches to be registered to it, so that we can eliminate this one connection per feed/watch requirement Galago currently has.

GalagoWatch – Presence Push

Tonight, most of the work needed for the GalagoWatch was completed. GalagoWatch is a nifty little API for saying, “I want to capture all presence info as it happens,” or “I want to capture all presence info on this service” or “on this account” or “for this user,” etc.

The API is theoretically finished, but not yet tested. I got side-tracked, and adding away status and away message support to the gaim-galago plugin, and am in the process of adding emblem support to the GalagoGtkPresenceIcon widget. Although I should really be asleep right now, I figure I’ll get that done, set the widget up with GalagoWatch support, and get most of the bugs out.

I’m told that jdub’s speech went really well. I’m hoping I can get a copy of it. It’s too bad I couldn’t be there in person to hear it 🙂

Galago Screenshots!

I started work today on the first Gtk widget to use Galago. It’s a simple presence indicator icon. It’s a bit hacky, as it polls every 10 seconds for new status, which can make things slower than they should be. However, the GalagoWatch API that’ll be coming in galago soon will deliver new presence and association information directly to anything that uses it, so this problem will go away soon.

Anyhow, I have a test program, and two screenshots. The first is doing a presence query for myself while I’m online and non-idle, and the second is when I’ve become idle:

Online Presence

Idle Presence

Perrty.

Gaim-Galago

A lot of good presence work was done on Galago today. Presence feeds can now return a list of presences for the user sent to it, which is useful on such things as IM. Say, for example, a program requests presence for user ChipX86, but neglects to specify a service or source account, since it just doesn’t care. The feeds can now return lists of presences, containing, say, Yahoo and AIM presences.

So I got tired of playing with a test presence feed, and wrote a plugin for Gaim that would provide presence information. So far, it’s working rather well, except for the fact that Gaim’s current concept of status royally sucks. I’m working on it, but am having difficulties creating an easy to use API that handles status exclusion. I talked to Kevin Stange, and he suggested using slots, which could work.

So, with that concept, protocol plugins would define one or more slots, each with an exclusion boolean flag set to TRUE or FALSE. Status types would be registered into a slot. The typical status types, such as Offline, Online/Available, Away, Extended Away, etc. would all go into an exclusive slot, while status types such as Mobile, would go into a non-exclusive slot.

The idea is to have this covering all aspects of status. The state of the user, what the user is connecting from (cell phone, etc.), and anything else. Not everything would have to be displayed. There will be type hints used for that, and prpls can still specify what to show. However, there will be a lot more flexibility in what kind of states can be chosen. Available messages will be doable for protocols that support them, for example.

Also, this will be core/UI split, which has been needed for awhile.

I should have status done within the month, if all goes well.

Depending on what happens tomorrow with my girlfriend, I may or may not start the galago-gtk widgets module in CVS. If I get something really cool, I’ll post a screenshot.

Galago – Finally some progress!

After four days of hacking, Galago now provides enough structure for a program to act as a feed for presence information, and for others to request that information. This includes information on a user’s service, the status(es), away message, etc.

There’s currently only one method for requesting presence. It blocks until it receives a response, but there will be two more methods. The first new method for receiving presence information will be a function that takes a callback function as a parameter. The program can continue going on its merry way, and the callback will be called with the new presence information when it’s finally available.

The second new method will be to use a GalagoWatch. GalagoWatch will be used for both presence and associative information, but for now, I’ll concentrate on the presence. You initialize a GalagoWatch, feed it the information needed so it can do its queries, set a callback function, and then start it. Any time the user’s presence information changes, the callback will be called with the new information. This would be useful for widgets and such.

It’s exciting to see it come together. Once I implement those and clean up the server a bit, I’ll be writing a Gaim plugin that acts as a feed, and a widget to display status information for the user passed to the widget. Exciting 🙂

Galago Presence, Gaim Status

So far, the Galago framework is coming together rather well. I don’t have anything that runs and communicates yet, but a lot of the base framework has come together, and I expect to build test programs by next week (assuming all the other busy things in my life don’t take up too much time).

At the moment, I’m working on the Galago Presence stuff. I’m running into design problems that I also have with Gaim’s status rewrite. This is to be expected, since the two are essentially the same thing.

The main issue I had in the Gaim status rewrite is that I wanted to generalize status types, and provide a mechanism for multiple types to be set at once. This also requires that some times exclude other types from being defined. Unfortunately, this creates a big mess when registering status types.

My vision for Gaim status is to cover all aspects of a user’s status. Their online state, offline, away, brb, idle, whether they have encryption enabled, mobile communications, etc. The display in Gaim would be the same as it is now, with the exception that the Away menu would be a little different, as would the away dialog. Icons would still appear in the list.

The problem comes when we want to say, “away implies online” or “online excludes offline” or “I’m online, away, but hidden.” It can get confusing, so it needs to be done in a simple fashion.

Now, back to Galago and status. How detailed should status information be? We probably don’t need to know every little detail like we do in Gaim, but maybe we do? How do we standardize it then? It’s easier when we have control over the source tree in Gaim and can make status IDs all match, but when we have third party applications defining their own IDs, it doesn’t work so well.

The approach I’ve taken in the Galago presence code currently is to separate it out into a status type (an enum defining OFFLINE, AVAILABLE, AWAY, EXTENDED_AWAY, and HIDDEN, currently), a status name (“BRB,” “On The Phone,” “Away,” “Online,” etc.), and an optional message (such as an away message). I believe this is sufficient for most purposes. It won’t allow the applications using Galago to display a mobile or game indicator or other such things, but it will give the generic status to those applications.

Another option is to do what we have above, but allow a person to have multiple statuses. That way, they can indicate they are away and are using a mobile device. This should be broadcasted as one presence packet, as presences for a single person on one protocol are not additive. The last one sent is the one that gets seen.

There’s still an issue with applications sending odd statuses, like the user is away and available at the same time, or they’re offline and online. I guess that’s up to the individual programs to fix. We can’t do all their work for them.

It’s still not as flexible as what Gaim’s status model will end up being, I’m sure, but it works sufficiently for most cases, in my opinion. If the user wants any further information on the user’s status, they can check their buddy list or whatever else is providing the detail.

With that in mind, I’ll probably move forward in that direction.

Scroll to Top