Live data from Hacker News

Lovefield – A relational database for web apps

google.github.io

31–40 of 60 posts

Re: Lovefield – A relational database for web apps

#31

From the first 1 minute and 15 seconds of the video: > "With WebSQL being deprecated, and IndexedDB not providing structured queries, web developers need a tool to satisfy their structured query needs." > "Web app developers need structured queries to work in the mobile world." > "With IndexedDB ... there's a steeeep learning curve to make it useful for your app. Moreover, IndexedDB does not provide structured querie…

I see the opposite. I see it as everything that was right about the decision not to include WebSQL. Specifically (a) you didn't needed WebSQL. See Lovefield. And (b) you can implement whatever you like that fits your needs instead if trying to shoehorn the one true solution.

The same is true of many other parts of the web. I'm glad O3D failed (I was on that team) and I'm glad something like Unity/X3D/VRML isn't built into the web. I'm glad instead we have something low-level like WebGL that people can build many and varied higher level solutions on (Three.js, X3D, Unity->WebGL, Unreal->WebGL, SceneGL, Babylon3D, Pixi.js, etc.) You pick the solution that best fits your project.

Lower-level building blocks are better IMO in most cases. They are easier to test. Have less incompatible edge cases and leave it up to devs to build or pick a solution that's right for their needs.

Re: Lovefield – A relational database for web apps

#32

From the first 1 minute and 15 seconds of the video: > "With WebSQL being deprecated, and IndexedDB not providing structured queries, web developers need a tool to satisfy their structured query needs." > "Web app developers need structured queries to work in the mobile world." > "With IndexedDB ... there's a steeeep learning curve to make it useful for your app. Moreover, IndexedDB does not provide structured querie…

> It was also the single-most decision that made me lose faith in the standards committee.

When I try to think of any product or service born of a standards committee that has been wildly successful, I can't think of any.

Standards committees are useful if the goal is to bring consensus-driven stagnation (and standards), so that things can evolve around a group of products/services rather than just individual products/services. But, there have been extremely complicated standards like some of those from OASIS: https://www.oasis-open.org/ that made developers waste countless hours trying to adhere when a high level of complexity wasn't necessary. And even well-used standards like SQL have not moved quickly enough with the times, e.g. if you look at the differences between the major databases (PostgreSQL, Oracle, SQL Server, etc.), there are still many DB-specific features that could be standardized.

> Instead of giving us one of the most well tested SQL implementations (SQL Lite) that addresses all of the above, and much more

I wish embedding PostgreSQL would get to the point that people would think of it before SQLite, especially in situations like this that are generic, because there is so much more that could be done with it. Here's one recent effort in Java: https://github.com/yandex-qatools/postgresql-embedded and a slidedeck from a few years ago from the postgres lead at VMWare with that team's experience: http://www.slideshare.net/jkshah/pg-conf-eu2013embedded

Re: Lovefield – A relational database for web apps

#33

From the first 1 minute and 15 seconds of the video: > "With WebSQL being deprecated, and IndexedDB not providing structured queries, web developers need a tool to satisfy their structured query needs." > "Web app developers need structured queries to work in the mobile world." > "With IndexedDB ... there's a steeeep learning curve to make it useful for your app. Moreover, IndexedDB does not provide structured querie…

The decision to not standardize WebSQL as proposed was correct -- because it wasn't a specification of behavior for which independent implementations were going to happen. It was, effectively even if not in principle, a mandate of a particular implementation.

That's not to say a web-platform relational API (even one based on SQL) standard would be a bad thing -- I think it would be a good thing. And its not to say that using SQLite as a key part of the stack in an implementation of such a standard would be a bad thing, either. But "behave exactly as version n of SQLite behaves" is not appropriate for a Web API standard, any more than "behave exactly as version n of Internet Explorer" would be.

Re: Lovefield – A relational database for web apps

#34
post #11
post #8

Earlier quoted context omitted.

Why couldn't Firefox use SQLite?

There's a W3C rule, that each browser needs their own implementation. If everybody uses the same code, it's considered a Monoculture security risk [1]. 1. https://www.schneier.com/blog/archives/2010/12/software_mono...

I wonder then how come so many browsers are allowed to be Webkit based

Re: Lovefield – A relational database for web apps

#35
post #34
post #11

Earlier quoted context omitted.

There's a W3C rule, that each browser needs their own implementation. If everybody uses the same code, it's considered a Monoculture security risk [1]. 1. https://www.schneier.com/blog/archives/2010/12/software_mono...

I wonder then how come so many browsers are allowed to be Webkit based

Browsers are "allowed" to do whatever they want, but the W3C is very unlikely to endorse some feature as a standard if Webkit is the only codebase that intends to implement it. Which is basically what happened with WebSQL.

Re: Lovefield – A relational database for web apps

#36
post #6

Earlier quoted context omitted.

Offline-first web apps. Think of all of the "native mobile apps" that could actually be done as a web app, but instead get built as native applications just because the application needs to store data.

Also Electron apps. It's currently pretty painful getting sqlite working with Electron, this could be a nice alternative.

Have you tried the emscripten port of SQLite? It's worked well for me... http://github.com/kripken/sql.js

Re: Lovefield – A relational database for web apps

#37
post #3

What is a browser database and what is it good for? Would you use one instead of a back-end DB or in conjunction with one? How? Why? Why is this on 1st page - what is cool about it? I'm clearly missing something, but I can't be bothered to watch the videos - can someone TL;DR it for me, please.

I implemented a character manager using TaffyDB[1], loading lots of static data upfront. Made calculations using cross "table" lookups much simpler from a coding perspective.

[1] http://www.taffydb.com

Re: Lovefield – A relational database for web apps

#38
post #21

I'm not a web developer, but this looks great, I want to learn how SQL things work, maybe this is a good start for beginner ? BTW, speaker's face is too serious.

I would think you'd want to use a more mature/complete SQL database, with broader documentation and a larger community, to learn about SQL. MySQL or PostgreSQL, would be the obvious free choices. Unless you specifically want to learn about client-side browser-based SQL databases (which is a pretty specific niche of SQL database), in which case this would be interesting, but possibly not extremely relevant to development work you'd be doing today, since it is so new.
Post reply on HN