8 ms·
> it's a database for localhost only This is sticking so hard to Sqlite, but it's really no longer true I think. Given WAL mode and tools like litestream, it's
by config_yml 4y ago
> it's a database for localhost only
This is sticking so hard to Sqlite, but it's really no longer true I think. Given WAL mode and tools like litestream, it's even feasible to run Sqlite in serverless offerings like Cloud Run. The schema change constraints are annoying though, even when there are known workarounds.
And, this is off topic, but Tailwind is really becoming the new Bootstrap. I open a page and it's instantly visible that this has been implemented with Tailwind (and often Tailwind UI).
- christophilus 4y agoI wouldn't have noticed the Tailwind thing, and I'm building a product with Tailwind at the moment. But yeah. I agree that Tailwind does seem to be gaining that level of traction. It's so, so nice, though, so I think it deserves its success.
- benbjohnson 4y agoLitestream author here. Pure ephemeral serverless offerings aren't currently supported with Litestream so you'll run into issues with something like Google Cloud Run. It's on the roadmap to support in the future though.
- mtlynch 4y agoFWIW, I've used Litestream on Google Cloud Run and never run into issues, but I haven't pushed it much: https://github.com/mtlynch/logpaste/blob/master/docs/deployment/cloud-run.md https://github.com/mtlynch/logpaste/blob/master/docs/deploym...
- benbjohnson 4y agoYou're a brave soul, Michael. :)
- jpcapdevila 4y ago@ben Same as the other commenter, I'm currently using it without problems. I configured max instances to 1 and that seems to be working fine. What am I missing?
- benbjohnson 4y agoThe main issue is if GCR tries to start up another instance before tears down your old instance during a deploy. If GCR only runs a single instance at a time then you should be fine.
- giraffe_lady 4y agoIt's no longer technically true that sqlite is limited in that way. But that is relatively new territory (compared to plain sqlite or postgres for sure) so you can expect some unknown troubles there. I'd be willing to launch a product on it in some circumstances, but depending highly on the resources, composition, goals, and risk tolerance of the team. I'm excited about where it's going but DB is so important and the alternatives are so well understood it still feels like a big move.
- _wldu 4y agoYou can also run a simple rest API on the machine hosting the sqlite DB and access it from other machines. I've found that works fairly well. Clients -> Internet -> API -> sqlite
- tianzhou 4y agoOne of the Bytebase authors here and I am the one who chose SQLite in the first place. The project started in 2021 Jan and I did notice litestream. And actually, one of the main reasons I chose SQLite is because of litestream. Because I could see it could be our HA solution when needing it. SQLite is great, but the schema change constraint is really painful as you mentioned. As to the Tailwind, as a backend engineer working on database for most of my 10+ career and single-handedly built the site, I can only say it's godsend;)
- no_wizard 4y agoCompletely unrelated to the thread, but the graphic on your home page doesn't quite re-size correctly, at least in the latest version of Firefox. It blocks the star button at i'd say tablet -> desktop range (somewhere between full width and not quite tablet) if you go smaller, it does at certain sizes block a bit of the text. tl;dr it doesn't look like the main graphic on your home page handles fluid layouts EDIT: this goes with a few other graphics on the front page as well. I also noticed some of your copy doesn't read well grammatically. "For Developer" I think reads better as "For Developers", as an example. Only mentioning this cause this is a really cool concept that I wish I had thought of years ago when I worked more heavily with databases and want you to succeed! One of the reasons ORMs are "nice" is the built in schema migration of a lot of the most mature ones (coming from .NET and previously Django). This is a similar idea, but for teams that need high performance SQL optimizations to be able to change schema that may be written against "raw" SQL / Window functions etc.
- tianzhou 4y agoThanks for the feedback and the encouraging words. I did try, but front-end development is harder for a database engineer... Definitely could be improved here.
- born-jre 4y agoany plan to maintain this[0] as separate library so anyone can embed pg in go binary? [0] https://github.com/bytebase/bytebase/tree/6a72eb630c604e2fe71de207a92a7db807261f09/resources https://github.com/bytebase/bytebase/tree/6a72eb630c604e2fe7... edit: there is already sth like that https://github.com/fergusstrange/embedded-postgres https://github.com/fergusstrange/embedded-postgres
- RedShift1 4y agoThat's really pushing SQLite where it was clearly not engineered to go. If you need something that is accessible over the network, use a database server that is designed for it. The right tool for the right job.
- er4hn 4y agoNonsense. Just be like the Tailscale team and use SQLite [1] to serve your entire customer network. [1] https://tailscale.com/blog/database-for-2022/ https://tailscale.com/blog/database-for-2022/
- jpalomaki 4y ago"SQLite does not compete with client/server databases. SQLite competes with fopen()." https://www.sqlite.org/whentouse.html https://www.sqlite.org/whentouse.html
- jhgb 4y agoFirebird can do both, though.
- mekster 4y agoI often see this quoted but I don't see how they compete at all? Or am I just not getting a joke?
- antifa 4y agoI have seen a lot of enthusiasm for using sqlite instead of postgres for django/laravel/rails type projects, or just using it for your tests. I think both of these opinions are over valued since it's easier to learn postgres once then to learn sqlite then migrate to postgres. The real developer cost of "install postgres, createuser, createdb" is basically nothing. I see the cost of ever using sqlite (coupling my tests/and/or app, migrating as soon as you have 2 users) as much higher. Sqlite does seem like a safe, solid, and sane default for the embedded/fopen people though.
- theobr 4y agoRe: the "tailwind is the new Bootstrap" bit - half agree. tailwind-typography is highly opinionated and "automatically applied", unlike Tailwind itself. I don't think that Tailwind will be quite as immediately visible outside of blogs....unless TailwindUI really takes off. Unless you're really sensitive to colors, then you might notice the Tailwind gray
- trinovantes 4y agoOne of my favorite features of SQLite is its memory mode. It makes writing tests really quick and easy compared to having to spin up a test Postgres database and then deleting it.
- bob1029 4y agoWe use sqlite for everything. One novel application is the evaluation of business rules. What we do is create an in-memory sqlite DB, fill in with relevant domain info, then execute the queries against it to evaluate logical outcomes. Sqlite's unique application-defined function capability is what sold us on this path. It's very very fast too. Thousands of queries per second per instance are no problem.
- munk-a 4y agoWe've found quite a few ways to tune DB testing to make it as light as possible but yea - it's still not free by any measure - you can ensure a sane base data set (any static data, all the table schemas) and have minimally necessary writes to set up test cases but you'll never get as close to pure in memory exercise. I wonder if you could write a postgres shim layer to run your tests on a SQLite in-memory instance - though I guess you're at the whims of whatever that shim layer is doing matching actual postgres functionality bug for bug.
- deleted 4y ago[deleted]