RE: W3C Working Draft for Data Store API

Thanks for the reply. I hope you had great holidays. See in-line

On 6 feb 2014 at 11:33:44, Gene Lian wrote:
> Sorry for the delayed response. Just came back from CNY holidays.
> Please see the in-line response.
>
> ----- Original Message -----
>> From: "EDUARDO FULLEA CARRERA" <efc@tid.es> To: "Gene Lian"
>> <clian@mozilla.com>, public-sysapps@w3.org Cc: "Ehsan Akhgari"
>> <ehsan@mozilla.com>, "Andrew Overholt" <overholt@mozilla.com>, "Jonas
>> Sicking" <jonas@sicking.cc> Sent: Wednesday, February 5, 2014 6:53:08
>> PM Subject: RE: W3C Working Draft for Data Store API
>>
>> Hi Gene,
>>
>> Great piece of work. Thanks. I have a few questions:
>> -How to ensure uniqueness of the DataStore 'name'?
>
> This is a good question. I think we somehow need to stop that
> when registering the apps' manifests.
>
> Fire https://github.com/airpingu/data-store-api/issues/16

>
>> -Any difference between 'add' providing an 'id' as argument and 'update' that
>> is update (data, id) vs. add (data, id) ? In case no difference, do we need
>> both?
>
> Just hope to make the operations more explicit so that the caller
> can handle the errors properly.
>

It is ok to have to separate operations but in order to avoid duplicated operations we could drop 'add' with 'id' as argument and stick to:
update (data, id)
add (data)

>> -Have you thought about adding the additional parameter 'data' to
>> DataStoreChangeEvent, so that the app can update on the fly when receiving
>> the events. In case there is any reason not to do that, what is the value
>> added by having 'id' and 'operation' in DataStoreChangeEvent, if the user
>> needs to invoke DataStore.sync() anyway to perform the synchronization?
>
> I'd prefer letting the sync(...) function do the real synchronization
> in any way. That is, the onchange event just plays a role of notification.
> This can add more flexibilities of letting apps decide when to really
> do the sychronization. For example, 10 onchange events will then trigger
> one sync(...), thus avoid IPCs carrying too many data records to slow
> down the performance.
>

No problem to restrict the real sync to the sync() operation, but do you think that having 'id' and 'operation' in DataStoreChangeEvent adds any value when it comes to deciding when to do the sync()?

> Gene

________________________________

Este mensaje se dirige exclusivamente a su destinatario. Puede consultar nuestra política de envío y recepción de correo electrónico en el enlace situado más abajo.
This message is intended exclusively for its addressee. We only send and receive email on the basis of the terms set out at:
http://www.tid.es/ES/PAGINAS/disclaimer.aspx

Received on Thursday, 6 February 2014 14:48:13 UTC