W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2010

Re: [IndexedDB] IDBRequest Interface Questions

From: Jeremy Orlow <jorlow@chromium.org>
Date: Mon, 22 Mar 2010 17:29:44 +0000
Message-ID: <5dd9e5c51003221029g1e88ca00g30869c713be153e0@mail.gmail.com>
To: Shawn Wilsher <sdwilsh@mozilla.com>
Cc: public-webapps WG <public-webapps@w3.org>
On Mon, Mar 22, 2010 at 5:17 PM, Shawn Wilsher <sdwilsh@mozilla.com> wrote:

> On 3/22/2010 10:05 AM, Jeremy Orlow wrote:
>> I also can't seem to figure out what the success event is supposed to be
>>> for just about anything.  Am I just missing something, or is this not yet
>>> specified?
>> When onsuccess fires, you can then start the next request.
> Sorry, I guess I'm not being totally clear in what I'm asking.  In the
> Events [1] section, only IDBDatabaseError is specified.  I'm not sure what a
> success message should look like, and that's what I'm asking to be
> clarified.
>  Do you have anything to say regarding a callback based API vs. event one
>> that inherits from EventTarget?
> By callback you mean passing a callback function into the API calls,
> correct?  Assuming that, I prefer the event based API, but I think the
> current spec could you some modifications to address some concerns that were
> brought up.
> As I recall, the issue with the current event-based model is that you can
> only have one request in flight at a time.  I think we could solve this
> problem by having the asynchronous methods return an IDBRequest object
> instead of having a global one for a given context (not completely sure how
> to describe all the places where we have a request attribute but that is
> what I am talking about).  I'm not 100% sure yet if we'd need the request
> attribute on all of these things after doing this, or what it would be in
> each instance.

I'm not an expert on JS performance, but I wonder if this would be a
bottleneck in a highly optimized implementation. Then again, maybe it's not
that much worse than simply passing callback functions into the API calls.

Btw, this is one of the things I mentioned on a thread in the last week or
two.  It'd be really nice if you and anyone else could weigh in on the
recent threads about this stuff.....

At this point, I really don't care.  I just want to get all of this settled
on so I don't have to re-write my bindings in a couple weeks.

Received on Monday, 22 March 2010 17:30:36 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:23 UTC