Gaia/Contacts/Data Refactor/mozcontactsProposal: Difference between revisions

Line 7: Line 7:
This proposal advocates for collapsing two datastores (mozContacts and GCDS) into one. As a result the role of the GlobalContactsDatastore will be played by the regular mozContacts datastore. An entry in the referred datastore could have local data and/or pointers to contacts present in the external providers datastores (Facebook, Gmail, etc.). We will be providing a library that will allow to obtain all the data associated to a mozContact entry (MultiContact library).
This proposal advocates for collapsing two datastores (mozContacts and GCDS) into one. As a result the role of the GlobalContactsDatastore will be played by the regular mozContacts datastore. An entry in the referred datastore could have local data and/or pointers to contacts present in the external providers datastores (Facebook, Gmail, etc.). We will be providing a library that will allow to obtain all the data associated to a mozContact entry (MultiContact library).


To support this approach the mozContact object will be extended with a 'sources' attribute (vcard standard) intended to contain an array of tuples (external service provider, id of the external contact referred to its origin datastore). There can be contacts in the system that may only exist in the external service and in that case all the mozContact attributes will be empty apart from the referred 'sources' attribute. On the other hand there could be local contacts that only contain data present on the device and which 'sources' attribute will be empty.
To support this approach the mozContact object will be extended with a 'sources' attribute (vcard standard) intended to contain an array of tuples (external service provider, id of the external contact referred to its origin datastore). There can be contacts in the system that may only exist in the external service and in that case all the mozContact attributes will be empty, apart from the referred 'sources' attribute. On the other hand there could be local contacts that only contain data present on the device and which 'sources' attribute will be empty.


= Architecture =
= Architecture =
172

edits