Live data from Hacker News

Turso is an in-process SQL database, compatible with SQLite

github.com

101–109 of 109 posts

Re: Turso is an in-process SQL database, compatible with SQLite

#101

Earlier quoted context omitted.

[flagged]

They are giving their stuff away for free, hence they can do whatever they want. It goes without saying, that spiritual teachings are not there to create quarrel and division.

The Trojans did the same. Beware the man who has no morals. His kindness could be cruelty disguised.

Re: Turso is an in-process SQL database, compatible with SQLite

#102
post #10

I’d imagine there’s an extremely long tail of features and quirks that will take time to iron out even after SQL compatibility is achieved. Looks like it’s still missing some important features like savepoints (!!!), windows and attach database. I’d be more excited and imagine it would be more marketable if it focused instead on being simply an embedded sql db that allowed multiple writers (for example), or some othe…

I think that async support for multi-read(and write) are part of the reason for the separate Turso library in Rust over the C fork (libSQL). I also wouldn't be surprised if baking in better support for replication was a design goal as well. Being file-format compatible with SQLite is really useful as well. In the end, the company is a distributed DBaaS provider using a SQLite interface to do so... this furthers that…

You're only file format compatible if you don't use any of the Turso extensions.

Just like STRICT tables, as soon as you use an unsupported feature in your schema, your database becomes incompatible.

With STRICT tables you needed to upgrade SQLite tools.

But if you use something from Turso you're placing yourself outside the ecosystem: the SQLite CLI no longer works, Litestream doesn't work, sqlite_rsync doesn't work, recovery tools don't work, SQLite UIs don't work.

Turso has no qualms with splitting the ecosystem. They consider themselves the next evolution of SQLite. The question is do you want to be part of it?

Re: Turso is an in-process SQL database, compatible with SQLite

#103
post #49
post #29

Earlier quoted context omitted.

I thought the point of Turso was to offer better concurrency than SQLite currently does. A la https://turso.tech/blog/beyond-the-single-writer-limitation-... and https://penberg.org/papers/penberg-edgesys24.pdf Would be great if one of the Turso developers can clarify :)

Honestly, if you care about that level of concurrency, it begs the question of why are you using an in process database in the first place?

It's not just about performance: having an in-process MVCC engine would simplify the implementation of many single-machine concurrent applications. Currently you usually have to combine SQLite with some kind of concurrency primitives; this is extremely painful because most OS-level concurrency primitives are really easy to misuse (e.g. it's trivial to accidentally add deadlocks, and very hard to spot and remove these ahead of time: example hard to spot concurrency bugs https://fly.io/blog/corrosion/, https://rfd.shared.oxide.computer/rfd/400)

Re: Turso is an in-process SQL database, compatible with SQLite

#104
post #74

Earlier quoted context omitted.

> Amazing test suite. Lol, is that a joke. Seesh. [To be clear, i think sqlite is the hands down winner on this front, no contest. Does the Turso test suite qualify it to be used in safety critical applications? I don't think so]. To your other points - look if it works for you i'm not here to tell you you can't use it. However these features sound more trendy than useful. To me these sound like negatives. A bunch of…

Have you seen the SQLite test suite? AFAIK, it's private/secret/closed. I think that is a part of the argument against SQLite.

Do you usually read test suites?

I care that sqlite is being tested against it, because i care that sqlite is well tested. i'm not super concerned that part of the test suite is closed source as i dont need to directly use it.

Re: Turso is an in-process SQL database, compatible with SQLite

#105
post #92

Earlier quoted context omitted.

> I would wonder why anyone would chose Turso over SQLite well, Turso adds features otherwise yeah, there'd be no reason

Ok, `io_uring` (like NVMe but for IO commands from application to kernel) and DBSP (high-grade framework for differential (as in, based on Delta streams/diffs not full updates) compression of "incremental view maintenance", it can keep materialized views synchronously up-to-date with a cost proportional to just the diff (for most typical ones; certain queries can of course be doing things at an intermediate stage tha…

> Ok, `io_uring` (like NVMe but for IO commands from application to kernel)

Are there benchmarks comparing turso with io_uring to sqlite (with other config the same)?

io_uring has the potential to be faster but its not garunteed. It might be the same, it might be slower, depending on how you use it. People bragging about the technology instead of the result of using the technology is a bit of a red flag.

Re: Turso is an in-process SQL database, compatible with SQLite

#106
post #98

Earlier quoted context omitted.

There's a few options... they could be using separate database instances per client to isolate workloads... if there are fewer than 10k or so users at each client, it's pretty doable without a lot of effort, you can further isolate types of data into separate databases as well... other operations can rely on heavy caching, such as maintaining the list of dbs for each client, etc. You CAN use a single database instanc…

If each client has its own database, does that mean you're automating the infra to turn on a new instance for each database, and then routing requests appropriately? Not too hard with k8, I suppose. Or if you add new clients infrequently enough it's a manual task. But you wouldn't do this for each user - it assumes you have some higher level of organization (client/tenant/org/etc). Sounds like these are different way…

Why would you need a different service instance to connect to a different database file?

And yeah, it's effectively sharing data... My point is there are lots of use cases that can fit in this type of database usage.

Re: Turso is an in-process SQL database, compatible with SQLite

#107

Earlier quoted context omitted.

I think that async support for multi-read(and write) are part of the reason for the separate Turso library in Rust over the C fork (libSQL). I also wouldn't be surprised if baking in better support for replication was a design goal as well. Being file-format compatible with SQLite is really useful as well. In the end, the company is a distributed DBaaS provider using a SQLite interface to do so... this furthers that…

You're only file format compatible if you don't use any of the Turso extensions. Just like STRICT tables, as soon as you use an unsupported feature in your schema, your database becomes incompatible. With STRICT tables you needed to upgrade SQLite tools. But if you use something from Turso you're placing yourself outside the ecosystem: the SQLite CLI no longer works, Litestream doesn't work, sqlite_rsync doesn't work…

Maybe. I don't think having parallel divergence is inherently bad. DuckDB doesn't replace SQLite...

But depending on the need, I'm probably more inclined to reach for something like Turso today than Firebird of I want something I can embed and connect to a server to sync against, for example.

Like most things, it depends.

Re: Turso is an in-process SQL database, compatible with SQLite

#108

Earlier quoted context omitted.

Have you seen the SQLite test suite? AFAIK, it's private/secret/closed. I think that is a part of the argument against SQLite.

Do you usually read test suites? I care that sqlite is being tested against it, because i care that sqlite is well tested. i'm not super concerned that part of the test suite is closed source as i dont need to directly use it.

Yes, I do look through test suites. You can learn a lot from them.

Without seeing it, you have no idea how good it is at all. I'm not knocking the SQLite guys... But it's just a factual statement. It's unknown to most.

Re: Turso is an in-process SQL database, compatible with SQLite

#109
post #10

I’d imagine there’s an extremely long tail of features and quirks that will take time to iron out even after SQL compatibility is achieved. Looks like it’s still missing some important features like savepoints (!!!), windows and attach database. I’d be more excited and imagine it would be more marketable if it focused instead on being simply an embedded sql db that allowed multiple writers (for example), or some othe…

IIRC, multiple writers in SQLite is supported, their writes will just be serialized. What you don't have is concurrent writes. But, given SQLite writes are so fast, in practices it's not really a big deal.

If you haven't used SQLite in a real project with heavy writes, I'd say you do it. SQLite is WAY more powerful than people tend to think of it.

Post reply on HN