Other cool IDB projects are YDN-DB https://github.com/yathit/ydn-db which continues to develop and Dexie https://github.com/dfahlander/Dexie.js/wiki/Dexie.js which is also new.
I hope that some time in the near future I can stop writing ugly hacks in raw IDB to account for missing database features and browser incompatibilities. But I worry about losing performance if I delegate too much to one of these libraries (although I haven't really started seriously testing them yet).
https://github.com/google/lovefield/blob/master/docs/dd/05_q...
Lovefield has an in-memory row cache, which is conceptually a big map of row ids to rows (and that is why Lovefield has unique row ids across the board). Currently the cache is a "dumb" cache: it contains exact duplica of what are persisted in the IndexedDB. The reason for doing that is to workaround IndexedDB inefficiency of handing bulk I/O, as described in backstore section. By caching all rows in memory, Lovefield avoids any additional round-trip required to load data from IndexedDB, with the price of memory usage.
How does that handle the case where the user has the app open in two tabs? Is there any synchronization?
That tech is promising though, I like that we're opening new possibilities all the time.
If the server changes, as it could easily do if you had two separate browsers open (say, mobile safari and your desktop), you'd need quite a bit conflict resolution code.