[Telepathy] [Bug 12465] Current avatars API is likely to generate too much DBus traffic

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jan 22 06:41:32 PST 2008


http://bugs.freedesktop.org/show_bug.cgi?id=12465





--- Comment #15 from Simon McVittie <simon.mcvittie at collabora.co.uk>  2008-01-22 06:41:32 PST ---
> either we get too
> many signals, or the avatar retrieval is delayed with caching.

As implemented in the latest Gabble, neither is usually true, because we can
generally assume that server round-trips are orders of magnitude slower than
D-Bus. So events will typically go like this:

Server to Gabble: <presence><I-have-a-new-vCard-its-SHA1-is/></presence>
Gabble: AvatarUpdated(SHA1SHA1)
Client 1: RequestAvatars
Gabble to server: <iq type="get"><vCard/></iq>
Gabble to client 1: OK (i.e. D-Bus reply to RequestAvatars)
Client 2: RequestAvatars
Client 3: RequestAvatars
Gabble to client 2: OK
Gabble to client 3: OK
Server to Gabble: <iq type="result"><vCard>[base64 base64]</vCard></iq>
Gabble: AvatarRetrieved(binary binary)

If the vCard is already cached in RAM by Gabble, then it replies to
RequestAvatars with an AvatarRetrieved signal instantly (causing unnecessary
signals, yes), but this only occurs in the uncommon case where clients ask
about vCards we already know about - and if a client does that, that probably
means the client isn't implementing caching correctly, so we can't expect it to
behave well ;-)


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Telepathy mailing list