[Telepathy] improvements to avatar and aliasing interfaces
Xavier Claessens
xclaesse at gmail.com
Fri May 18 23:59:27 PDT 2007
On sam, 2007-05-19 at 04:49 +0100, Robert McQueen wrote:
> Abner Jose wrote:
> > What about aliasing? Will it work in the same way as Avatar?
>
> It's a different problem to avatars because often aliases are pushed to
> you, and it's not often it requires a round-trip to the server. The idea
> I had for aliasing was that we could leave the existing API as-is, with
> RequestAliases, but also add a function GetAliases, which would return
> the current known value of any cached/received/heuristically-determined
> aliases, but also potentially sending off some longer-running requests
> which would return AliasChanged later.
>
> On a similar note, I was considering an API on the Connection, something
> like ContactQuery, or the turbo-handle inspector, which would take a
> load of handles and return you a sparse dictionary for each, containing
> any information known about them keyed by identifiers, eg 1 could be
> string value of the handle, 2 could be the alias, 3 could be the
> presence, 4 could be the avatar token, 5 could be the handle owner (if
> the given handle was channel specific).
>
> Also, the return value could include opportunistic results about any
> owner handles (in the same way that DNS queries can return extra
> relevant results). It could also have the semantic of sending off any
> relevant long-running queries, and later emitting signals when this
> information was received.
>
> The intention would be to reduce bus-roundtrips (which are the real
> performance killer) when e.g. joining a channel, or receiving an
> invitation from someone, etc: rather than querying 3 or 4 different
> methods for handle x y and z, you can immediately make 1 method call for
> [xyz] and scrape out any info the connection manager has about them at
> the moment, and hook the signals for any subsequent updates.
>
> Any thoughts?
G R E A T !
For a client point of view it makes things easier. When I first get a
contact list I do ContactQuery on all contacts at once and I get all
information directly available in the return value and updates that
requires server roundtrip are given in signals once the server answered.
Actually when I get a contact list I have to call:
- InspectHandle
- GetPresence
- RequestAlias
- RequestAvatar on each contact
Even if we group RequestAvatar calls it means 4 dbus calls.
btw, RequestAvatar and RequestAlias returns the value without emitting
the changed signal. RequestPresence returns nothing bug emits the
signal, GetPresence acts like other Request* methods... Would be cool to
have a convention like Get* returns directly the value and Request* emit
signals. But I guess that's a problem of API stability ?
Xavier.
More information about the Telepathy
mailing list