Re: Quota API to query/request quota for offline storages (e.g. IndexedDB, FileSystem)

Some other topics I have not (explicitly) responded yet:

On Thu, Feb 3, 2011 at 9:32 PM, Joćo Eiras <joao.eiras@gmail.com> wrote:
> >   interface StorageInfo {
>
> Should probably be QuotaInfo or even QuotaManager ? Storage can and
> will be confused with Web Storage.

I have no strong opinion here, while I mildly preferred 'StrongInfo'
as the API is meant to provide a common interface to various storage APIs.
Maybe QuotaInfo is better?

On Fri, Feb 4, 2011 at 5:37 AM, Eric Uhrhane <ericu@google.com> wrote:
> > Hum, right. But then my comment does apply to "requestQuota" no ? No
> > need to ping data files to store a new value for the quota, which is
> > usually just a pref.
>
> That's an implementation detail.  Plus, storing a preference to a
> persistent database involves file IO, which can take an arbitrarily
> long time and/or fail.
> An async API leaves a lot of freedom for developers, so in general we
> try to use them for everything new outside the worker context.

As for sync vs async interfaces, I really would like to keep it
asynchronous.  As Eric suggested UA may need some disk IO to return
the info or make a decision.

On Fri, Feb 4, 2011 at 5:52 AM, Jonas Sicking <jonas@sicking.cc> wrote:
> One thing that you are not discussing is UA behavior when the quota
> limit is reached. In Firefox 4, for IndexedDB, once the page reaches
> 50MB, we prompt the user if he/she wants to allow the page to store
> more information. Only if the user chooses "no" do we start failing
> writes. If the user chooses "yes" the fact that we reached the quota
> limit is transparent to the page (apart from that a write takes a bit
> longer while waiting for the prompt).
> Technically we don't need to change anything about the spec to handle
> this, we can just allow the UA to increase the quota limit at any
> point in time if it desires. But I figured I should bring it up.

Thanks for bringing it up.  Currently I do not intend to include
the UI prompting policies/issues or how UA should behave when the
quota limit is reached in the spec.  And also (as I noted in my several
previous emails) I generally think that prompting to the user should
be avoided as much as possible, as far as the request from the
page does not impose major/visible pressure to the user disk.

On Fri, Feb 4, 2011 at 6:56 AM, Glenn Maynard <glenn@zewt.org> wrote:
> On Thu, Feb 3, 2011 at 7:32 AM, Joćo Eiras <joao.eiras@gmail.com> wrote:
>> General note: using bytes as measure is probably overkill. While I
>> doubt localStorage would even exceed a couple megabytes, making an
>> entire e-mail account available offline with indexedDb or web sql db
>> could easily climb to a couple GBs. Perhaps kilobytes is better ?
>
> Saying 4*1024*1024*1024 isn't a lot of work, and using different units means
> I have to remember which units each function uses.

Using bytes might be overkill, but here I have a sympathy to Glenn's
opinion as I myself often get confused by different units in different APIs,
and I'd like to keep it to use bytes, the simplest units.

Thanks,

Received on Monday, 14 February 2011 11:41:05 UTC