TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Lovefield: Cross-browser, SQL-like, relational query engine on top of IndexedDB

80 pointsby peter637over 10 years ago

8 comments

streptomycinover 10 years ago
As someone who has extensively used&#x2F;abused IndexedDB in the development of <a href="http://basketball-gm.com/" rel="nofollow">http:&#x2F;&#x2F;basketball-gm.com&#x2F;</a> I can say that I&#x27;m really happy to see some serious libraries built on top of IDB. Years ago people said &quot;yeah, it doesn&#x27;t have all the features of Web SQL, but you could build something like that on top of it&quot; but now that&#x27;s finally starting to actually happen.<p>Other cool IDB projects are YDN-DB <a href="https://github.com/yathit/ydn-db" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;yathit&#x2F;ydn-db</a> which continues to develop and Dexie <a href="https://github.com/dfahlander/Dexie.js/wiki/Dexie.js" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;dfahlander&#x2F;Dexie.js&#x2F;wiki&#x2F;Dexie.js</a> which is also new.<p>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&#x27;t really started seriously testing them yet).
xtacyover 10 years ago
This documentation page is an excellent overview for anyone who wishes to understand how a declarative language such as SQL is actually translated to an execution plan behind the scenes:<p><a href="https://github.com/google/lovefield/blob/master/docs/dd/05_query_engine.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;lovefield&#x2F;blob&#x2F;master&#x2F;docs&#x2F;dd&#x2F;05_q...</a>
streptomycinover 10 years ago
<a href="https://github.com/google/lovefield/blob/master/docs/dd/04_cache.md" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;google&#x2F;lovefield&#x2F;blob&#x2F;master&#x2F;docs&#x2F;dd&#x2F;04_c...</a><p><i>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 &quot;dumb&quot; 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&#x2F;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.</i><p>How does that handle the case where the user has the app open in two tabs? Is there any synchronization?
ivancerasover 10 years ago
SQL-like? How about your use a real SQL used in SQLite, <a href="https://github.com/kripken/sql.js/" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;kripken&#x2F;sql.js&#x2F;</a>
评论 #8658783 未加载
dangayleover 10 years ago
You need to support Python, Java AND Node.js for this? Sheesh.
vespakoenover 10 years ago
Here is a nice collection of node.js &#x2F; browser stuff that wraps around IndexedDB &#x2F; LevelDB &#x2F; WebSQL and is mostly compatible with one another.<p><a href="https://github.com/rvagg/node-levelup/wiki/Modules" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rvagg&#x2F;node-levelup&#x2F;wiki&#x2F;Modules</a>
VeejayRampayover 10 years ago
Now they only need to add a &quot;commitToServer()&quot; feature that uses some diff since the last commit and we got a stew going.<p>That tech is promising though, I like that we&#x27;re opening new possibilities all the time.
评论 #8659087 未加载
评论 #8658993 未加载
bjornlouserover 10 years ago
Why did you choose Lovefield as the project name over DealeyPlaza?