What is a galago?

A few weeks ago I have been working with the libgalago library by Christian Hammond. If you don’t know what is libgalago take a look at this article of the Linux Journal. Basically galago is a library that provides presence to applications.
This library had a little performance issue. libgalago uses DBUS for getting/setting presences, and all the calls through the bus were synchronous. Imagine a device with low resources, for example the Nokia 770, that uses libgalago. It could be that if you have a lot of contacts, an application that uses libgalago could get stalled due to it should wait for every call to the bus that requests for presences, contacts, services …etc.

I implemented an asynchronous implementation of three common libgalago calls:

  • galago_get_service
  • galago_service_get_account
  • galago_account_get_presence

These new asynchronous calls created new race conditions, because they could need some data that could be freed before the call to the function was made. So it made sense to implement another function galago_cancel_call that cancels an asynchronous call.

I sent the patch to Christian Hammond and he accepted it. It seems that he thought that it could be very interesting to add more asynchronous calls in the future, so he made some refactoring in the library code instead of applying the patch directly. Now you can use the asynchronous calls of libgalago because these changes are merged in the HEAD of the libgalago repository.

Happy presence :)

This entry was posted on Thursday, July 6th, 2006 at 8:21 am and is filed under Hacking. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

  • July 2006
    M T W T F S S
    « Jun   Aug »
     12
    3456789
    10111213141516
    17181920212223
    24252627282930
    31  

One Response to “What is a galago?”

  1. jonny says:

    jonny

Leave a Reply