Lovefield: Cross-browser, SQL-like, relational query engine on top of IndexedDB
1–10 of 12 posts
Re: Lovefield: Cross-browser, SQL-like, relational query engine on top of IndexedDB
#2https://github.com/google/lovefield/blob/master/docs/dd/05_q...
Re: Lovefield: Cross-browser, SQL-like, relational query engine on top of IndexedDB
#3Re: Lovefield: Cross-browser, SQL-like, relational query engine on top of IndexedDB
#4That tech is promising though, I like that we're opening new possibilities all the time.
Re: Lovefield: Cross-browser, SQL-like, relational query engine on top of IndexedDB
#5Other 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).
Re: Lovefield: Cross-browser, SQL-like, relational query engine on top of IndexedDB
#6SQL-like? How about your use a real SQL used in SQLite, https://github.com/kripken/sql.js/
Re: Lovefield: Cross-browser, SQL-like, relational query engine on top of IndexedDB
#7Now they only need to add a "commitToServer()" feature that uses some diff since the last commit and we got a stew going. That tech is promising though, I like that we're opening new possibilities all the time.
Re: Lovefield: Cross-browser, SQL-like, relational query engine on top of IndexedDB
#8Re: Lovefield: Cross-browser, SQL-like, relational query engine on top of IndexedDB
#9Now they only need to add a "commitToServer()" feature that uses some diff since the last commit and we got a stew going. 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.
Re: Lovefield: Cross-browser, SQL-like, relational query engine on top of IndexedDB
#10Lovefield 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?