Live data from Hacker News

Limbo: A complete rewrite of SQLite in Rust

turso.tech

41–50 of 238 posts

Re: Limbo: A complete rewrite of SQLite in Rust

#41

Given the code quality and rigid testing, SQLite is probably the last project that should be rewritten. It'd be great to see all other C code rewritten first!

Seems like a potentially interesting project to get rid of sqlite's compatibility baggage e.g. non-strict tables, opt-in foreign keys, the oddities around rowid tables, etc... as well as progress the dialect a bit (types and domains for instance).

Re: Limbo: A complete rewrite of SQLite in Rust

#43

Given the code quality and rigid testing, SQLite is probably the last project that should be rewritten. It'd be great to see all other C code rewritten first!

Code quality is not the only thing to consider. Some people would love to see something like SQLite with 2 important changes: referential integrity that respects the DDL and strict tables that also respects the DDL.

Re: Limbo: A complete rewrite of SQLite in Rust

#44
post #18

Earlier quoted context omitted.

I do see a need for multiple implementations of SQLite3. First there's the need for multiple implementations for the reasons given by the LibSQL folks, second there's the need for a memory-safe language implementation of SQLite3, and third there's the need for a native language implementation for languages whose runtimes really want not to have C involved (e.g., Go).

The fact that there's no alternative implementation of SQLite also seems to play a part in preventing standardization of WebSQL. https://www.w3.org/TR/webdatabase/ "The specification reached an impasse: all interested implementors have used the same SQL backend (Sqlite), but we need multiple independent implementations to proceed along a standardisation path."

I was completely unaware of that! How old is that document? I should reach out.

Re: Limbo: A complete rewrite of SQLite in Rust

#45
post #5

I’ll take the faster c version anyday over the rust. How are those conditional if statements working for you all?

The benchmarks in the post indicate that Limbo is more performant than SQLite, not less.

This is often true on the journey to reach feature-parity with an original codebase.

The reason is obvious, of course: it has less features, and doing nothing is always faster than doing something.

Once it's feature complete, then meaningful comparisons can be made. For now, it's puffery.

Re: Limbo: A complete rewrite of SQLite in Rust

#46
post #33

Are there any plans for the python bindings to support an async interface?

That would be a really cool feature! I've been running sqlite3 in async python for Datasette for six years now but it involves some pretty convoluted threading mechanisms, having native async would be fantastic.

Re: Limbo: A complete rewrite of SQLite in Rust

#47
post #44
post #18

Earlier quoted context omitted.

The fact that there's no alternative implementation of SQLite also seems to play a part in preventing standardization of WebSQL. https://www.w3.org/TR/webdatabase/ "The specification reached an impasse: all interested implementors have used the same SQL backend (Sqlite), but we need multiple independent implementations to proceed along a standardisation path."

I was completely unaware of that! How old is that document? I should reach out.

That effort died about 14 years ago.

Re: Limbo: A complete rewrite of SQLite in Rust

#48

Earlier quoted context omitted.

The benchmarks in the post indicate that Limbo is more performant than SQLite, not less.

> Executing cargo bench on Limbo’s main directory, we can compare SQLite running SELECT * FROM users LIMIT 1 (620ns on my Macbook Air M2), with Limbo executing the same query (506ns), which is 20% faster. Faster on a single query, returning a single result, on a single computer. That's not how database performance should be measured or compared. In any case, the programming language should have little to no impact on…

The goal here is not to claim that it is faster, though (it isn't, in a lot of other things it is slower and if you run cargo bench you will see)

It is to highlight that we already reached a good level of performance this early in the project.

Your claim about the programming language having no impact is just false, though. It's exactly what people said back in 2015 when we released Scylla. It was already false then, it is even more false now.

The main reason is that storage is so incredibly fast today, the CPU architecture (of which the language is a part) does make a lot of difference.

Re: Limbo: A complete rewrite of SQLite in Rust

#50
post #8

disclosure: I work here. I am happy to answer any questions tl;dr We are rewriting SQLite in Rust. It uses Asynchronous I/O, considers WASM as first class, and has Deterministic Simulation Testing support from the beginning. source: https://github.com/tursodatabase/limbo

Is your company a member of the SQLite Consortium? https://www.sqlite.org/consortium.html
Post reply on HN