7 ms·
I hope fly is able to make it. I’m rooting for them - however - I’m starting to wonder if the SQLite push isn’t more “this is fun and interesting to build” and
by erulabs 3y ago
I hope fly is able to make it. I’m rooting for them - however - I’m starting to wonder if the SQLite push isn’t more “this is fun and interesting to build” and less “customers want this”.
Don’t get me wrong - this is neat - but I’d never suggest anyone to actually use this outside of a fun experiment. The problem with existing SQL dbs isn’t really the architecture - its the awful queries that do in memory sorting or make temporary tables for no reason or read-after-write, etc, not network latency. SQLite won’t fix your current production problems.
If it turns out they’re building this for customers throwing cash at them, awesome. I just somehow doubt it. I think Planetscale has the better approach: a drop in replacement for MySQL/RDS with a smarter query planner. As a production engineer that’s what I want to pay for!
- jjtheblunt 3y agoI think you're skipping the replicated read only use case, which is our use case, and it's super handy there. but i understand this is a restricted scenario where little could really go wrong, and it could be done other ways.
- sodapopcan 3y agoLots of smaller businesses could do fine with this if they don't have a write-heavy workload. Like an ecomm shop, for instance.
- lib-dev 3y agoYeah it seems to make a lot of sense in ecomm. Product search and filtering on tables in the 1000s rather than the millions.
- endisneigh 3y agoAny self respecting e-commerce site would want fault tolerance and strong consistency even with potential network partitions, so definitely not SQLite as described in article
- sodapopcan 3y agoThey aren't necessarily going to have all this. Lots of smaller ecom shops can run on a single server per region. If you're a North American company selling a few hundred t-shirts per day in NA and EU, it could probably be fine, no? I'll admit I'm not speaking from experience. Rather, I have experience in everything I just said only I was using pg, not sqlite. But I've been very interested in sqlite recently.
- emodendroket 3y agoWhy even build your own e-commerce Web site at all in that case? It’s undifferentiated work.
- evantbyrne 3y agoAs with anything, the typical business can use something off-the-shelf, but a certain percentage are doing things differently enough that custom development becomes practical. I had to custom build the billing system for Beaker Studio to properly meter customers. Even Stripe's metering API wasn't flexible enough to handle per-hour metering.
- emodendroket 3y agoI find it hard to imagine a reason a shop selling 100 tee shirts in a day would need any custom functionality since this is basically the exact use case all these OOB e-commerce tools are built for.
- evantbyrne 3y agoYeah, you're probably right about that. Main thing that would likely be custom would be the design.
- sodapopcan 3y agoI've worked for such a place. Off-the-shelf solutions are trying to be everything to everyone and you can end up customizing the crap out of them to the point where it can become more onerous than just building your own. The place I worked was also print-on-demand service and had hundreds of thousands of SKUs as well as allowed customers to make custom products and we also hosted some peoples' shops. Shoehorning that into a custom solution was painful. I work at a very similar place now that uses Shopify. Managing that many SKUs on Shopify is crazy painful. The thing is is that custom ecom solutions really aren't that hard. The off-the-shelf ones are complex because, as stated above, they are trying to be everything to everybody.
- hinkley 3y agoLots of small businesses invent write heavy workloads and don't realize how many thousands of dollars they are spending a month on being nosey.
- nitwit005 3y agoIf you're a smaller e-commerce business, your whole site can probably be cached aside from auth, checkout, and order history.
- sodapopcan 3y agoI can say with authority that this is true! We used to store our whole massive catalog in Varnish.
- Xeoncross 3y agoReplace SQLite with Excel and read it again.
- Varriount 3y ago> It's the awful queries that do in memory sorting or make temporary tables for no reason or read-after-write, etc. Are there any viable alternatives though? I often wonder what an SQL-like language built from the ground up would look like.
- erulabs 3y agoThe alternative is to write good queries! Alternatively, a better query planner that has a more liberal approach to "I know what you want, not what you're asking for". A great article on this re: Planetscale's approach is at https://vitess.io/blog/2021-11-02-why-write-new-planner/ https://vitess.io/blog/2021-11-02-why-write-new-planner/
- mattgreenrocks 3y agoI’m excited about SQLite for web apps if only because it is one less moving piece in my stack, which focuses on prototyping and finding product market fit. If I start hitting hundreds of writes per sec, then, thats either awesome or I wrote some horrible code.
- erulabs 3y agoThis is exactly where I think SQLite shines! Unfortunately, I don't get to do much green-fielding in my career.
- teaearlgraycold 3y agoIf you want a read only database that’s too large to simply be a JSON file hosted on a CDN it makes sense. That’s kind of niche but not unheard of.
- laurencerowe 3y ago> The problem with existing SQL dbs isn’t really the architecture - its the awful queries that do in memory sorting or make temporary tables for no reason or read-after-write, etc, not network latency. SQLite won’t fix your current production problems. In my experience SQL databases are pretty poor at executing the kinds of deeply nested joins needed to return all of the data needed to render more complex UIs. It almost always ends up being faster to simply make nested selects in batches. So latency ends up mattering in these cases. You can work around this by denormalizing the data, but this often explodes your data size.
- ngrilly 3y agoWhich is exactly where SQLite shines, but I guess that was your point: https://www.sqlite.org/np1queryprob.html https://www.sqlite.org/np1queryprob.html
- WuxiFingerHold 3y agoI can't imagine many suitable production use cases too. Alternatives like Planetscale, Supabase or Neon are even easier to use and at the same time much more powerful. If latencies around 50 ms are too much for the specific use case, SQLite with Litestream could be a great solution. Otherwise I'd go with managed Postgres/MySQL solutions.
- oooyay 3y agoI recently implemented SQLite for a metadata application at work. My constraints in design were pretty concise; the application will only ever need to scale vertically, my data persistence story is a matter of speed and accessibility over longevity, I have plenty of options for scaling disk IO, and my read performance is much more paramount than write performance. The outcome is that my persistence later is not adding $200/m immediate service overhead cost and my deployment was easy to manage, which is a strong promise made to the rest of the team. I think there's a place for SQLite, but just like any tool you need to know that your design constraints match the constraints of the tool.
- eek2121 3y agoThe first iteration of my website used sqlite. I only switched away because the growing audience made me nervous.