W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2010

Re: [IndexedDB] Interaction between transactions and objects that allow multiple operations

From: Jeremy Orlow <jorlow@chromium.org>
Date: Wed, 5 May 2010 19:44:38 +0100
Message-ID: <AANLkTimfM3ME2wzwntYydsMUqytZI-pWrFI7r6vYodBm@mail.gmail.com>
To: Shawn Wilsher <sdwilsh@mozilla.com>
Cc: Pablo Castro <Pablo.Castro@microsoft.com>, public-webapps WG <public-webapps@w3.org>
On Wed, May 5, 2010 at 7:02 PM, Shawn Wilsher <sdwilsh@mozilla.com> wrote:

> On 5/4/2010 7:17 PM, Pablo Castro wrote:
>
>> c) require an explicit transaction always, along the lines Nikunj's
>> original proposal had it. We would move most methods from database to
>> transaction (except a few properties such as version and such, which it may
>> still be ok to handle implicitly from the transactions perspective). This
>> eliminates this whole problem altogether at the cost of an extra step
>> required always.
>>
> I'm rather loath about adding more asynchronous steps to do even the most
> simplest of tasks here.  What about only doing this for cursor operations
> only?  Basically, openCursor would be on the transaction object instead of
> on the database object.
>

On the other hand, a lot of even the most basic tasks probably should be
done within a transaction.  But if the easiest way to do something is to
just run it outside of a transaction, I'm guessing a good portion of users
(including tutorial websites, people giving advice on forums, etc) will just
do it that way.  Mandating transactions forces users to be cognizant of
them.  Maybe that's a good thing...

J
Received on Wednesday, 5 May 2010 18:45:41 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:38 GMT