

Re: [IndexedDB] Compound and multiple keys

From: Joran Greef <joran@ronomon.com>
Date: Wed, 16 Mar 2011 20:43:38 +0200
Cc: public-webapps@w3.org
Message-Id: <09299BC7-B243-4452-9F5F-ED8917B2104D@ronomon.com>
To: Jonas Sicking <jonas@sicking.cc>
> It seems like you are suggesting pretty big changes. The best way to
> do this is likely to start a new thread (as the changes you are
> draft proposal there.

Not necessarily. Adding the option to specify indexes to be modified when putting or deleting an object would go a long way already, solving the problem of compound and multiple keys in the process.

The next step after that, supporting compose-able set operations on indexes, would take some work, in terms of figuring out the best interface for doing it, hopefully keeping it fairly tightly coupled to the standard set operations themselves.

> are saying above.

Will do. The proposed changes have the potential to reduce the spec and implementation of IDB. The problem of IDB being exposed to a dose of application state certainly needs to be addressed.

> Also, I should mention that time is running out on major changes. We
> already have two database APIs, WebSQL and IDB, (three if you count
> localStorage), so there both needs to be significant advantages over
> the already existing APIs, and you would make yourself a favor by
> acting fast as the other specifications are gaining momentum literally
> by the day.
> / Jonas

Do you really consider LocalStorage to be a database and what do you mean by database then? And how can you say that we "have" a database API in WebSQL if it is currently deprecated? Are there plans afoot to embed SQLite in Firefox? That would be a great idea by the way.

As far as I am aware, LocalStorage cannot be used as a database. I have tried. Most browsers do not permit more than 10mb and do not provide a means for the user to adjust storage quota. Browsers provide no locking mechanism (although you could simulate a lock service on top of LocalStorage if you could tolerate the latency) and some implementations (Safari as far as I can recall) load the entire contents of LocalStorage into memory on first access, blocking the UI. As you know, WebSQL is deprecated and only available in WebKit and Opera. Chrome as far as I am aware provides no mechanism to adjust WebSQL quota limits.

So that means we actually only have one potential cross-browser database API (and not three as you have stated), and that is IDB. It may be a good idea to slow down and get it right.
Received on Wednesday, 16 March 2011 18:44:13 GMT
