6 ms·
Turso is an in-process SQL database, compatible with SQLite
- mergisi 9mo ago[dead]
- loloquwowndueo 9mo agoBut I thought turso already had an SQLite-compatible thing, libsqlite! Turns out this is covered in the readme: libsqlite is a fork (so, presumably C) while turso database is a rust rewrite. Good luck to the friends at Turso!
- XorNot 9mo agoI'm confused why I would use this when Sqlite exists? Being written in Rust it's not even a good libc-less drop in choice for a language like Go?
- loktarogar 9mo ago> Turso Database is a project to build the next evolution of SQLite in Rust, with a strong open contribution focus and features like native async support, vector search, and more
- mattrighetti 9mo agoOne quick thing I can think of is multiple writers [0] [0]: https://turso.tech/blog/beyond-the-single-writer-limitation-with-tursos-concurrent-writes https://turso.tech/blog/beyond-the-single-writer-limitation-...
- ZeroCool2u 9mo agoThis is a huge differentiator. I built our internal meme platform with Turso. Really fun and easy to use.
- zdragnar 9mo agoHow much internal traffic are you generating that single thread sqlite writes can't keep up?
- ZeroCool2u 9mo agoThe meme machine cannot be stopped. It's really not that much, but this has the nice side effect of I simply don't need to worry about it.
- tonymet 9mo agoisn't this just pushing the complexity around? Either my write thread manages the lock, or turso's does.
- gpm 9mo agoMVCC is a non-locking algorithm for concurrent writers that the big databases like postgres use (with caveats like aborting some transactions if conflicts would exist). It's not a matter of pushing locks around but allowing multiple threads to operate on the data concurrently.
- tonymet 9mo agothanks helpful thanks. seems to have some tradeoffs. I would likely lean toward the simpler thread model but it sounds compelling.
- ncruces 9mo agoWhat's the isolation level? They only mention write-write conflicts. The reason SQLite's BEGIN CONCURRENT does not greatly increase concurrency (unless you're very careful with your schema and queries) is as much due to page level conflict detection as it is because it enforces serializable isolation.
- netghost 9mo agoIt natively supports vector embeddings, which seems like it could be nice. The sqlite extensions I've tried for vector embeddings have been a challenge to get working (may just be me though).
- everfrustrated 9mo agoThe entire reason behind Turso is that the author had a beef with the sqlite people.
- rednafi 9mo agoTurso is sqlite with a server client arch. I use them for stashing my llm usage logs all the time. Pretty neat. Plus I'm rooting for them to rewrite sqlite in Rust.
- MobiusHorizons 9mo agoIf it is in-process (as the article says), why do you describe it as client / server architecture? If it’s not in-process why compare it to SQLite instead of other client server databases like Postgres?
- d1l 9mo agoI’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 other use case where SQLite falls short. DuckDB is an example- SQLite but for olap.
- Joker_vD 9mo agoThere is. For example, four months ago [0] they've accidentally stumbled upon about an explicitly documented quirk of SQLite file format. [0] https://news.ycombinator.com/item?id=45101854 https://news.ycombinator.com/item?id=45101854
- hiddendoom45 9mo agoI stumbled on the lock page myself when I was experimenting with writing a sqlite vfs. It's been years since I abandoned the project so I don't recall much including why I was using the sqlitePager but I do recall the lockpage being one of the first things I found where I needed to skip sending page 262145 w/ 4096 byte pages to the pager when attempting to write the metadata for a 1TB database. I'm surprised they didn't have any extreme tests with a lot of data that would've found this earlier. Though achieving the reliability and test coverage of sqlite is a tough task. Does make the beta label very appropriate.
- ncrmro 9mo agoI’ve been using it locally and with their hosted offering for awhile now and it’s rock solid other than if I make super deeply nested joins which overflow something. But other that that it’s super fast and cheap I haven’t had to need more than the free tier with a bunch of stuff I host on cloudflare workers
- ako 9mo agoI've been using a sqlite alternative to avoid dependencies on a native library. It's go application that uses a native go sqlite reimplementation so i can create platform specific binaries that include all dependencies. Makes installation easier and more reliable.
- heliumtera 9mo agoCommit history is nuts! These guys are working.
- gritspants 9mo ago> AGENTS.md Claude is that's for sure
- menaerus 9mo agoIt goes to show how future of SE will look like. Loose reviews (a big win for the industry) with each person capable of doing 10x more work, and basically orchestrating/overlooking the work done by the agents. The bottleneck eventually at some point, if not already, will become a fatigue caused by having to process/acknowledge/understand the sheer volume of code spitted out at speeds that we could never have imagined before.
- heliumtera 9mo agoIf you are doing loose reviews I guess you're not strictly more productive, because this would be a different kind of work...a more "loose" work, but a scalar I'm volume.
- menaerus 9mo agoLoose work? No, quality of work being done does not correlate with reviews in almost any way, unless you're a lousy engineer doing lost work anyways. High quality reviews are exceptionally rare.
- blibble 9mo agothe description as "the next evolution of sqlite" is offensive D. Richard Hipp has done a universal good for the world by releasing sqlite into the public domain and maintaining it for 25 years I bet this VC funded knockoff won't see 5
- gpm 9mo ago> the description as "the next evolution of sqlite" is offensive That marketing is really the one thing that keeps me from considering this as a serious option. To callback to an article a few days ago, it's a signal of dishonest intent [1], and why in the world would I use the alternative built by apparently dishonest people when sqlite is right there and has one of the best track records in the industry. [1] https://zanlib.dev/blog/reliable-signals-of-honest-intent/ https://zanlib.dev/blog/reliable-signals-of-honest-intent/
- tonyhart7 9mo ago[flagged]
- doodlesdev 9mo agoSQLite is public-domain software and one of the best well-maintained pieces of software around today. You absolutely have to be very careful before saying things like these, as they bring lots of implications. I wouldn't call it offensive _per se_, but I'd say it's in bad faith at least. I'd just remove that if I were the devs, because everything else there makes me find the project at least interesting.
- renewiltord 9mo ago[flagged]
- rpcope1 9mo agoHow many times is this going to get shilled? It shows up at least once a month and the people associated with come in talking like it's almost trivial to "build a better sqlite" or that in essence SQLite3 is "deprecated." Give me a f**ing break.
- redwood 9mo agoIs there an example of a company that rewrote something popular in a faster / better language and built a successful business on that? I can think of ScyllaDB and Redpanda but aren't they struggling for the same reasons: not the default, faster horse, costly to maintain, hard to reach escape velocity
- gpm 9mo agoI feel like there's numerous database companies that rewrote an existing database faster/with slightly better features and turned it into a successful product. Just about all of the successful ones really. It's a market where "build a faster horse" has been a successful strategy. Certainly some of the newer succesful database companies are written in more modern languages (for example go with cockroachdb, go originally and now rust with influxdb) but it's wrong to call these (or really any language) faster than C/C++ just more productive languages to develop reliable software in...
- redwood 9mo agoI agree you see there's a lot in the database space I just don't know many have reached escape velocity more often they've raised a bunch of venture capital funding and plateau and then have a big problem
- gpm 9mo agoI have an impression that the two I named (cocroachdb, influxdb) are actually commercially successful, but I could be wrong.
- graerg 9mo agoYou could make the case uv falls in this category (I just prefix all my pip commands with uv) though we have yet to see if astral will become a "successful business"; I'm hoping they pull it off.
- thayne 9mo agoI'm not sure how big of a factor it is, but scylla and red-panda are both source available, and VC funded, while the projects they are trying to replace are fully open source, and owned by a non-profit foundation. That probably isn't the only reason they are struggling, but it is a potential reason not to switch. Granted, scylla used to be open source. And turso is VC funded and potentially vulnerable to a license change in the future.
- kobieps 9mo agoHopefully anything useful and stable in turso will be ported to sqlite
- kleton 9mo agoA gotcha, if you are expecting compatibility with sqlite. You can't set PRAGMA journal_mode=WAL and expect to be able to read database state from another process. Turso will report exclusive lock
- sealeck 9mo agoI 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-with-tursos-concurrent-writes https://turso.tech/blog/beyond-the-single-writer-limitation-... and https://penberg.org/papers/penberg-edgesys24.pdf https://penberg.org/papers/penberg-edgesys24.pdf Would be great if one of the Turso developers can clarify :)
- bawolff 9mo agoHonestly, 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?
- miohtama 9mo agoOne reason is that architecture and maintenance are much simpler
- sealeck 9mo agoIt'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://fly.io/blog/corrosion/, https://rfd.shared.oxide.computer/rfd/400 https://rfd.shared.oxide.computer/rfd/400)
- deaux 9mo agoDidn't have a good experience with them. One day we suddenly started to experience severe latency spikes, lasting for more than a day, causing timeouts. Unrelated to our DB which was small, even happened on trivial queries - a networking thing on their side. Google showed this to have happened before with certain regions of theirs. If you can't offer a certain region in a stable manner as a DB vendor, don't offer it. The whole point of outsourcing DB mangement is to take care of these things.
- cortesoft 9mo agoI am confused, this product appears to be an in-process DB, so what does "networking thing in their side" even mean?
- memothon 9mo agoTurso offers a cloud-hosted sqlite product. The idea is you can easily spin up per-tenant databases and have a "serverless" sqlite interface. It feels like it has a lot of the same downsides of hosted databases so I'm not sure what the specific value is. From their site they really emphasize local first syncing (so mobile apps and electron/tauri apps) and multi tenancy (hard database boundaries)
- oofbey 9mo agoHuh. That sucks but also isn’t surprising. Seems like putting this in the cloud eliminates most of its benefits though. If you’re going to wait for that much latency you might as well use a “real” (traditional big complicated) rdbms.
- sudhirb 9mo agoFor me, a lot of the draw is that it's cheaper than managed db services for small/toy projects of mine (that I don't want to use dynamo db for) - that and in a previous job it was useful as relatively temporary multi-tenant storage.
- 9mo ago
- heyts 9mo agoThis looks like a solution in search of a problem already solved by SQLite
- thayne 9mo agoI think the problems with sqlite: - sqlite can't do concurrent writes, which is a performance bottleneck for certain workflows - sqlite is synchronous, which isn't ideal in applications that are async - while sqlite itself is open source, the test suite is proprietary, which means forking it and adding your own features or bug fixes isn't really practical. Of course, that is also a significant barrier to turso having sqlite compatibility. Does turso really solve those problems? IDK. Does it introduce new problems? Almost certainly. But those are real problems that people have.
- gritspants 9mo agoProprietary? Are you referring to the test suite they created for avionics that last I checked they've never really sold? I think it's highly misleading to make that claim if so.
- thayne 9mo agoI thought most of the test cases were proprietary, but it looks like you are right and it actually is just the TH3 test suite, and the fuzzer.
- maxpert 9mo agoDisclaimer: I am author of Marmot https://github.com/maxpert/marmot https://github.com/maxpert/marmot so I will sound extremely bias. I have been asked multiple times on why I chose SQLite and not Turso. I've always responded people that I don't trust an open-source project once it's backed by a VC firm. I've moved away from Redis to Val-Key for same reason, and we have seen the Redis train-wreck in slow-mo. I hope at no point in future Turso ever ends up in that state, but chances are pretty high. At this point the "compatible with SQLite" has become a marketing term IMO, we all know how easy it is to break compatibility here or SQLite to break compatibility.
- bawolff 9mo agoI find it crazy that people would ask you in that direction. I would wonder why anyone would chose Turso over SQLite. SQLite is some of the most battle tested software in the world. Turso seems like relatively new software that is still a bit experimental. You do not want your databases to be new or trendy. You want your databases to be solid as a rock.
- jauntywundrkind 9mo agoSqlite had such a stellar stellar reputation, for so many excellent reasons. I still find it absolutely freakish & abominable that people are so incredibly touchy & reflexively mean & vile to Turso. I've seen a couple Turso centric YouTube's recently and there are dozens and dozens of up votes for what just seems like the most petulant vacuous reflexive bitter viewed comments, dominating the comments. Sqlite deserves its honor, is amazing! Yes! But there's such a wild concentration of negativity about a sqlite compliant open source rust rewrite. None of it is technical. It's all just this extreme conservatism, this reflexive no, I don't trust it, fud fud fud fud. (Can't find the worse example but https://youtu.be/CrIkUwo8FiY https://youtu.be/CrIkUwo8FiY somewhat shows this) I'm just so embarrassed having such low antagonistic peers dominating the conversation all the time. With zero moderation, zero maybe it's ok, just dialed 100% to no no no no. For fuck sake man. Everywhere I go it's not hackers, it's not possibility seekers, it's a radical alliance of people using fear uncertainty and doubt to cling to some past, refusing even possibility of different. It's so regular, so consistent, so tiresome and so useless. What if this is better? What if you are wrong? What if there is some possibility of better? It just feels like all the air time is sucked up by these negative creeps, always, everywhere, all around, with these absurd vast pervading pessimisms that admit to no maybe possiblies, that see no tradeoffs, that are just convinced always for the worst. And it's just so popular! Is the plurality! How anti-hackerly a spirit is anti-possibility! The world deserves better than these endless drag-gards. I'm obviously reacting strongly here. But I just want some God damned room left for maybe. The negative creeps never allow that: no no no no no, fear uncertainty & doubt endless & abundant, no possibility, just bad. I cannot stand the negative energy, I'm so sad the hackers have to put up with such absolutist shitty drains sucking all the energy from the room, everywhere, always. Sqlite somehow has such a strong anti-possibility anti-energy magnet around something so so good: what a shame, it deserves better, & iteration attempts deserve at least some excitement. Progress is possible, can be neat, and judging way too early & reflexively with empty comment is to be condemned, imho.
- deleted 9mo ago[deleted]
- deleted 9mo ago[deleted]
- pdyc 9mo agowhat is wasm size? how difficult is it to use in webapp? and does it allows udf's? in sqlite its quite easy to create udf.
- doanbactam 9mo agoWe switched our main API from Postgres to Turso last month and haven't looked back. The automatic schema migrations are a nice touch, but I wish the documentation on vector embeddings was a bit more robust. It's wild how much of the modern web is moving back to file-based databases. We switched our main API from Postgres to Turso last month and the cold start times are basically zero now. Are there any plans to support vector columns soon, or is that strictly off-roadmap for now?
- oofbey 9mo agoHow do you scale your front end horizontally with a file based database? Do you put the files on a shared file system that the app layer all mounts and lock when writing? Or do you shard and route by user? Or do you build a big vertically scaled API server with the database in it?
- tracker1 9mo agoThere'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 instance or file for everything, you can also use multiples to scale without falling strictly into a heavy vertical or horizontally scaleable database system. Especially if those db instances are distributed over a network channel to different physical servers on the back-end (as is with Turso). I've worked on a lot of systems where I had advocated the use of separate DBs either on a oer-client or per-project basis... Even from a single management server, you can do a lot... from a small cluster operating against SQLite databases you can do more. With Turso's efforts to improve concurrency, it can go further still. I'm not an employee, related to, or even an active customer right now... but I do understand the model and how it can work in a lot of use cases.
- oofbey 9mo agoIf 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 ways of manually sharding the database?
- feverzsj 9mo agoWithout SQLite's full test suit, I don't think it's as safe. Rust may have better memory safety, but that's just part of the issue.
- leosanchez 9mo agoNo dotnet client ?
- Sytten 9mo agoWhen it is ready for production and they implemented DDL to alter tables that D. Hipp just refuses to implement for some reason then I am in. People that feel attacked by this didn't have to deal with the antagonist behaviour of SQLite maintainers toward the community.
- deleted 9mo ago[deleted]