[whatwg] Gigantoredesignorrific changes to the Database API

On Thu, 25 Oct 2007, Dimitri Glazkov wrote:
> 1) The transactions are now required and this seems like an
> unreasonable performance hit. What if the API would assume transaction
> mode, but would allow authors to explicitly state that the operation
> is not a transaction:

On Fri, 26 Oct 2007, Brady Eidson wrote:
> I think we've established that with at least a few popular sql implementations
> - if you use things correctly - wrapping single statements in transactions
> does not affect performance in a critical manner.

I agree with Brady. We can add this in a later version if we need it -- I 
made sure the API had room for it.

On Thu, 25 Oct 2007, Dimitri Glazkov wrote:
> 2) Fully asynchronous is scary. Are we sure this is going to be
> well-digested? I can just see people doing this:
> db.operation(function(tx) {
>    var count;
>    tx.executeSql("SELECT COUNT(*) AS C FROM BLAH;", function(r) {
>        count = r.item(0).c;
>    });
>    if (count > 0) {
>         // do happy things.
>    }
> });

On Fri, 26 Oct 2007, Brady Eidson wrote:
> I am very pleased that this entire API is designed around the fact that
> "synchronous I/O on the main thread is bad," and would argue against any
> attempt to introduce synchronous I/O without an extremely compelling argument.
> I don't think "unskilled/uninformed developers might use the API incorrectly"
> is compelling enough to change the design and give them the power to do I/O on
> the main thread.
> There are various JS libraries - some very popular - that make "challenging"
> APIs easier to use, but I really don't think this one is all that challenging!

I think again that Brady's opinion is in line with most Web browser 
developers at this point; the synchronicity of the API was the biggest 
complaint of the first version.

On Thu, 25 Oct 2007, Dimitri Glazkov wrote:
> 3) I think I misunderstand step 11, help me out. If the commit has 
> failed once, why try to re-commit, even if the error callback instructs 
> you to?


Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Friday, 26 October 2007 15:50:36 UTC