Re: [IndexedDB] Design Flaws: Not Stateless, Not Treating Objects As Opaque

On Thu, Mar 31, 2011 at 12:16 AM, Joran Greef <joran@ronomon.com> wrote:
> On 31 Mar 2011, at 1:01 AM, Jonas Sicking wrote:
>
>> Anyhow, I do think that the idea of passing in index values at the
>> same time as a entry is created/modified is an interesting idea. And I
>> have said so in the past on this list. It's definitely something we
>> should consider for v2.
>
>> Oh, and if we did this, I wouldn't really know how to support things
>> like collations. Neither if you did collations using built in sets of
>> locales (like in Pablo's recent proposal), nor if you used some sort
>> of callback to do collation.
>>
>> / Jonas
>
> That's fine. You don't need to figure it out. Just look at how stateless databases have done it (or not done it) and do likewise.
>
> I submit to you that there is inadequate understanding of the concerns raised, hence the lack of urgency in trying to address them. That there is even a need for a "V2" is symptomatic of this.
>
> It may be a good idea to start looking at these things not as "interesting ideas" but as essential database concepts.
>
> If someone were trying to build some kind of transactional indexed key value store for the web, and they wanted to do a truly great job of it, they would certainly want to learn everything they could from databases that have made contributions to the field.

I previously have asked for a detailed proposal, but so far you have
not supplied one but instead keep referring to other unnamed database
APIs.

It has also been pointed out that there are unique constraints on APIs
in browsers. For example due to the fact that several "applications",
i.e. pages, will be interacting with a given database. At the same
time, and in some browsers from different processes. Additionally
we're aiming to make an API which is easier to use, and where we can't
place as much trust in the web page as you'd normally put in the user
of a database API. For example, you've asked for callbacks to
implement collations, but what do we do if those callbacks don't
return consistent results? Or even do evil things like modify the
stores where data is being inserted?

In short, I don't think we'll get much further here without a concrete
proposal. Especially not for IndexedDB v1.

/ Jonas

Received on Thursday, 31 March 2011 07:54:09 UTC