Gaia/Contacts/Data Refactor: Difference between revisions

FAQ
m (→‎FAQ: links)
(FAQ)
Line 92: Line 92:
* '''There is no way to know when a new Contact Provider is added'''
* '''There is no way to know when a new Contact Provider is added'''
In order to add a new Contact Provider datastore information and its corresponding contained data pointers to the list of providers stored in the GCDS we need to be notified about new installed apps exposing a datastore named ''contacts''.
In order to add a new Contact Provider datastore information and its corresponding contained data pointers to the list of providers stored in the GCDS we need to be notified about new installed apps exposing a datastore named ''contacts''.
Currently, we are able to request a list of all the datastores with an specific name from the GCDS app, but to do that the GCDS needs to be opened. And this only happens when a contact is changed in any of the already registered Contact Providers, which could happen immediately, next month or never. So we need a way to wake the GCDS up to do the proper registration of the new installed Contact Provider. We can simply trigger the datastore-change-* notification as soon as we detect a new datastore named X. The GCDS will be responsible to look for not already registered Contact Providers once it is woken up by the system message.
Currently, we are able to request a list of all the datastores with an specific name from the GCDS app, but to do that the GCDS needs to be opened. And this only happens when a contact is changed in any of the already registered Contact Providers, which could happen immediately, next month or never. So we need a way to wake the GCDS up to do the proper registration of the new installed/uninstalled Contact Provider. We can simply trigger the datastore-change-* notification as soon as we detect a new datastore named X. The GCDS will be responsible to look for not already registered Contact Providers once it is woken up by the system message.


* '''Potential desynchronization between Contact Providers content and GCDS'''
* '''Potential desynchronization between Contact Providers content and GCDS'''
Line 133: Line 133:


== FAQ ==
== FAQ ==
* What happen if a new app is installed and offers contacts?
* What happen if a new Contact Provider is installed/uninstalled?
Check the [[Gaia/Contacts/Data_Refactor#Notification_mechanism_about_datastore_changes_.28aka_DataStore_onchange_scheduler.29|Notification about datastore changes mechanism]]2 section. We need a datastore-change-* system message to be fired as soon as a new app exposing a 'contacts' datastore is installed. This will wake up the GCDS app which should get the list of 'contacts' datastores and add the ones that are not already registered.
Check the [[Gaia/Contacts/Data_Refactor#Notification_mechanism_about_datastore_changes_.28aka_DataStore_onchange_scheduler.29|Notification about datastore changes mechanism]]2 section. We need a datastore-change-* system message to be fired as soon as a new app exposing a 'contacts' datastore is installed. This will wake up the GCDS app which should get the list of 'contacts' datastores and add the ones that are not already registered.


Line 142: Line 142:


* What happen if I create a new contact?
* What happen if I create a new contact?
That will be a local contact, accessible from mozContacts API and it's datastore. A reference in the GCDS pointing to the original source will be created as well (unless merged with an existing one).
That will be a local contact, accessible from MozContacts API and it's datastore. A reference in the GCDS pointing to the original source will be created as well (unless merged with an existing one).


* What happen if I modify a contact from a external source?
* What happen if I modify a contact from a external source?
TBD, we need to talk with the sync team, but we expect that each source of contacts could decide it via datastore permissions (TBD).
That's responsibility of the Contact Provider owning the affected contact. Each Contact Provider needs to manage their own external replication and sync mechanisms. There is a [[Cloud_Services/FirefoxOS_Sync|parallel effort]] to provide a way for applications to register for notifications about synchronization windows that is out of the scope of this proposal.


* Will this GCD have access to the contacts of an specific app?
* Will this GCDS have access to the contacts of an specific app?
We want the user to decide that, which external datastores will be able to being used by the GCDS.
We want the user to decide that, which external datastores can be access by the GCDS and so shared with other Contact Consumers.
 
== Known issues ==


= Implementation =
= Implementation =
Confirmed users
483

edits