[Telepathy] Folks status, the addressbook problem
Xavier Claessens
xclaesse at gmail.com
Tue Oct 30 07:53:27 PDT 2012
Le mardi 30 octobre 2012 à 15:40 +0100, Xavier Claessens a écrit :
> Folks DB
> ========
> Folks is about merging Personas, so I suggest having a separate DB that does
> just that. An individual is in the DB if and only if it has more than one
> Persona. The DB must be optimized for 2 types of queries: 1) given an individual
> uid, give all its linked persona uid. 2) given a persona uid, give its
> individual uid.
>
> This means we have to define persona and individual uid:
>
> * Persona uid: I suggest using N9 format:
> "telepathy://<account path>/<contact-id>",
> "eds://<ESource id>/<EContact id>".
> Or anything from which we can fetch a TpContact or EContact.
>
> * Individual uid: there are 2 cases, does it have just one Persona or more?
> - just one: use its persona uid.
> - more than one: use a uuid and keep it in the DB.
>
> We need change notification when that DB is changed. Probably something like
> dconf where a daemon does the writing and clients does direct reading. Maybe
> crazy idea but could we actually use dconf for this? we could have
> /org/folkd/<individual uid> keys of type "as" which is a list of persona uid.
> I'm not sure how dconf will scale if we have thousands of such keys?
>
> I think merge/unmerge operations are not something we do daily, so it's not the
> most important operation to optimize.
What I did not cover is the automatic merging. I think an app that loads
the whole contact list (e.g. empathy and gnome-contacts) could suggest
some personas to merge based on heuristics, like Marco's N900 plugin. If
the match is really good it could proceed even without telling the user
(be careful, parents could share a landline number). So I like to keep
those implicit/automatic merging outside of Folks. So Folks does not
make any difference if 2 contacts are merged because they share an email
address, or if user just decided to merge, that would keep things easier
in folks, and in most of the case we really need to ask user in UI
anyway.
More information about the telepathy
mailing list