W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2009

[whatwg] RFC: Alternatives to storage mutex for cookies and localStorage

From: Robert O'Callahan <robert@ocallahan.org>
Date: Wed, 9 Sep 2009 14:45:29 +1200
Message-ID: <11e306600909081945q6673c908n2484358aba95e062@mail.gmail.com>
On Wed, Sep 9, 2009 at 12:54 PM, Maciej Stachowiak <mjs at apple.com> wrote:

> Yet another possibility is to keep a per-domain mutex, also offer a
> transactional API, and accept that careless authors may indefinitely lock up
> the UI for all pages in their domain (up to the slow script execution limit)
> if they code poorly, but in exchange won't have unexpected race conditions
> with themselves.
>

I prefer this. If the app has a bug that causes one window to get stuck,
most likely that's the window the user cares about anyway, so the other
windows (temporarily) getting stuck is not a big deal. Also, if one window
is hogging the database then an asynchronously dispatched transaction is
going to be delayed indefinitely*, so some or all user operations in other
windows will not be able to complete, even if the other windows appear to be
responsive to events.

* Unless we adopt a model where scripts are required to detect aborts and
restart.

Rob
-- 
"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
53:5-6]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090909/1c2c2d2a/attachment-0001.htm>
Received on Tuesday, 8 September 2009 19:45:29 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:52 UTC