Hacker News new | past | comments | ask | show | jobs | submit login

Google didnt, thus Chrome started replacing sqlite with https://github.com/google/leveldb



A product written by some notorious rock stars at Google, and with a reputation for corrupting data...

[1] - "...LevelDB has history of database corruption bugs.[15][16][17][18][19][20] A study from 2014 has found that, on older (non-checksummed) file systems, the database could become corrupted after a crash or power failure.[21]..."

https://github.com/google/leveldb/issues?utf8=%E2%9C%93&q=co...

https://bugs.chromium.org/p/chromium/issues/detail?id=261623

https://forum.syncthing.net/t/panic-leveldb-table-corruption...

https://github.com/google/leveldb/issues/333

https://ethereum.stackexchange.com/questions/1159/corruption...

[1] - https://en.wikipedia.org/wiki/LevelDB


You seem to believe a description like that is a recommendation, but it might be the opposite. Any corporation is a place where Not-Invented-Here virus spreads rapidly, because a) there are numerous problems and edge cases that develop at large scale; b) there is manpower to charge at them; c) there are incentives to do just so, and appear as definitely hard working to the management. That aura even spreads externally, in particular, to this conversation we have. If something is made by a hip company, it's a gods' gift to mortals, if it's from uncool place, it's definitely a rusty tech working on punch cards. (I am sure there exist at least one example in which the same person or team did both.)

Of course, they must have had valid reasons to use LevelDB for some components in Chrome. It seems that Minecraft-like world generating games are also a good use case for it. What I'm saying is that Google doing something does not automatically mean you need to do the same at all.


I think their reason was yolo. Cookies are still stored in sqlite so now they have two storage engines doing same thing to worry about.


It's worth pointing out that once you reach Google size and domination you can pretty much do whatever you want*. Things that if done by "ordinary" companies would destroy them or wipe out their customers/users overnight.

* Some limitations still apply.


if i was an sqlite user, i really wouldn't care at all about google switching from sqlite to that thing in chrome.

From the readme:

> LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.

it's a completely different thing from sqlite. sqlite is a relational database (which can also do key-value storing, I guess).

my educated guess is that google started with sqlite, then reached the peak usefulness *within chrome* and only then switched to developing its own custom solution.

if anything, this is a testament to sqlite and how far you can go with it before needing a custom solution.


Thats nice and all, but Im a Chromium user who wants to manually audit and edit my \User Data\Default\Local Storage. That wasnt a problem in sqlite days, tons of tools available. Switch to leveldb not only made that difficult (one paid GUI tool in existence afaik), but also introduced a change in localstorage behavior. Chrome localStorage used to return entries sorted by key, this is no longer the case.


I believe Chrome has deprecated LevelDB at this point. It turns out that LevelDB doesn't work well when you need many different databases in a single application. So all new Chrome storage is SQLite. At least until they find something better...


Whatever, blame it on chrome/chromium.

We’re talking sqlite here, your comment is off-topic.


A key-value store can underpin a SQL layer. Look at CockroachDB's usage of RocksDB (which is a descendant of LevelDB). Seems like a fair comparison to compare BTrees and LSM approaches. The latter work better because they align more closely with how solid state storage works. BTrees require a fair bit of pointer chasing for reads and are expensive to modify.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: