[Gossip-dev] Avatars+Gossip+Telepathy
Dafydd Harries
daf at rhydd.org
Wed Nov 8 09:17:18 CET 2006
Ar 06/11/2006 am 05:12, ysgrifennodd eitan at ascender.com:
> >I have started implementing avatars for the gossip branch using
> >telepathy. I am also implementing the server-side group support. Both of
> >these use experimental (non-reviewed) branches of the gabble connection
> >managers, so unfortunately is relatively hard to try these out yet.
>
> Could you point us to the patches/branches you are using?
>
> >
> >Avatars work already, but there are some issues which i want to raise
> >here:
> > * Since we need some persistant storage of the avatar token (to
> >optimize bus transfers) what API should i use to store a contact's
> >avatar ID to disk and read it back on restart. I suspect it involves
> >xml, am I right? Any pointer is appreciated here.
>
> We don't have any caching right now in gossip for avatar digests. Isn't
> the token about 60 bytes long? Why do you think this is a necessary
> optimization?
> At least in our XMPP backend we are recieving the digest with every
> presence notice anyway, so there is no need to cache.
The point is to use the token to cache the avatar. I don't think this needs to
be too complicated -- a cache could simply be structured
<prefix>/<token>.{png,jpg,gif,...}
Avatars which have not been used after a certain amount of time can be removed
from the cache.
The question is what <prefix> should be. The Telepathy specification only
guarantees that tokens are unique per contact, which suggests some kind of
string based on the account and the contact name. This doesn't allow caching
avatars for connections that don't have accounts, but I think that's
reasonable.
> > * This is a general problem in the Telepathy branch, every single
> >telepathy dbus call is synchronous. In the case of avatars it breaks
> >horribly since requesting an avatar is a direct IO operation over the
> >network. The whole branch need to be ported to async calls everywhere. I
> >can do this, but right now i prefer to concentrate on features. When i
> >finish avatars and server-side groups, i will start porting everything
> >to async calls.
>
> I see the overall need to asynchronize the telepathy code. But
> specifically for the avatar stuff, why don't you just implement it
> asynchronously now?
++
I think it's better to start using Telepathy asynchronously sooner rather than
later, especially for new code. This will help find problems early and
establish code patterns.
--
Dafydd
More information about the Gossip-dev
mailing list