[whatwg] Asynchronous database API feedback

Maciej Stachowiak mjs at apple.com
Tue Dec 11 14:53:16 PST 2007


On Dec 11, 2007, at 11:22 AM, Aaron Boodman wrote:

> On Dec 10, 2007 4:04 PM, Dan Mosedale <dmose at mozilla.org> wrote:
>> On Dec 10, 2007, at 12:21 PM, Geoffrey Garen wrote:
>>
>>>>> I'd hate for GMail to mysteriously stop working every couple of
>>>>> days just because of some background process that I had no
>>>>> knowledge of. As a developer, how would you debug such a problem?
>>>>> As a tech support worker, how would you explain it to an end user?
>>
>> +1.  Having a bug in a single web-app be able to completely freeze  
>> the
>> entire UI of the entire browser (not just that window/tab) seems like
>> a pretty painful user experience, almost to the point of being
>> unacceptable.  If an end user ran into this problem very often, I
>> would expect them to blame the browser, and perhaps even switch to a
>> browser which didn't have this problem (i.e. didn't support
>> localStorage).
>
> How does the globalStorage implementation deal with this problem? It
> has a synchronous storage API. True it is probably designed for
> smaller amounts of data, but there's nothing preventing an author from
> using it for large amounts (is there?). Also, some of the concerns
> raised here have nothing to do with the amount of data stored. Or does
> globalStorage not guarantee that data is written when the setter
> returns?

When/if we implement globalStorage in WebKit, it will likely be  
through preloading a site's global storage into memory at load time,  
and lazy writeback of changes. We'll probably set the per-site quota  
low enough that this is not unreasonable. I don't think globalStorage  
guarantees that the data must be on disk when set. I think it would be  
infeasible to take this kind of approach to the SQL API.

Regards,
Maciej




More information about the whatwg mailing list