News for hackers. Stuff that matters.
Re:You don’t need to be “enterprise-ready” or “scalable” by wereHamster on Tuesday May 31, 2022 @04:54PM (#31574828)
I'm working on a project where the backend devs decided to use Cassandra to manage a few hundred entities. Due to different access modes they had to denormalize the data into multiple tables and we're constantly running into consistency issues. A fucking sqlite db with a few tables and indexes would do just fine. Also, the tool has maybe a dozen DAUs. But it's web scale, so, yeah…
Re:You don’t need to be “enterprise-ready” or “scalable” by twblalock on Tuesday May 31, 2022 @05:13PM (#31575025)
That's not a scale problem. That's a problem of database choice. Cassandra is not good at that sort of query pattern at any scale.
Re:You don’t need to be “enterprise-ready” or “scalable” by jsiaajdsdaa on Tuesday May 31, 2022 @05:11PM (#31574998)
Why would a team decide to use nosql to manage "a few hundred" entities?

Nosql databases excel at simple lookups and gets by ID, rather than trying to sort and join pretty much ad hoc.

Re:You don’t need to be “enterprise-ready” or “scalable” by nkuttler on Tuesday May 31, 2022 @11:19PM (#31577650)
Resume driven design
Re:You don’t need to be “enterprise-ready” or “scalable” by maccard on Wednesday June 01, 2022 @04:42AM (#31579510)
At a few hundred entities, it doesn't really matter what tech you choose, so you should probably choose whatever is closest to hand.
Re:You don’t need to be “enterprise-ready” or “scalable” by winrid on Tuesday May 31, 2022 @06:04PM (#31575495)
NoSQL might not be the right term here. Maybe you mean "columnar databases"?

Ex Mongo sorts just fine, and can optimize sorting with indexes.

Re:You don’t need to be “enterprise-ready” or “scalable” by lmm on Tuesday May 31, 2022 @09:20PM (#31576955)
Why would you ever use SQL? The SQL transaction model doesn't make a lot of sense for most use cases (including essentially anything that uses the internet), and trivial usability things like being able to have collection columns without having to define a separate table all add up.
Re:You don’t need to be “enterprise-ready” or “scalable” by yCombLinks on Tuesday May 31, 2022 @10:18PM (#31577315)
That's roughly the same argument as choosing a strongly typed vs a weakly typed language. I much prefer the strong typing personally. Yes, it's more work up front. But every other person that works with the data knows what they're getting.
Re:You don’t need to be “enterprise-ready” or “scalable” by cutler on Tuesday May 31, 2022 @09:49PM (#31577138)
> SQL transaction model doesn't make a lot of sense .... anything that uses the internet

So decades of PHP+MySQL and Rails+PostgreSQL were simply misguided?

Re:You don’t need to be “enterprise-ready” or “scalable” by lmm on Wednesday June 01, 2022 @02:26AM (#31578806)
> So decades of PHP+MySQL and Rails+PostgreSQL were simply misguided?

To the extent that transactions were the point, yes (though there may not have been many alternatvies for a datastore to use when Rails was getting started).

In the case of PHP+MySQL of course MySQL transactions were disabled by default in that era (up until 2010 in fact).

Re:You don’t need to be “enterprise-ready” or “scalable” by housecarpenter on Wednesday June 01, 2022 @08:19AM (#31580759)
I'd be interested to hear why you think this, or if you can link to something that explains this perspective.
Re:You don’t need to be “enterprise-ready” or “scalable” by lmm on Wednesday June 01, 2022 @09:21PM (#31590215)
There's a fundamental mismatch between the HTTP request-response model and the SQL "open transaction" model - you can't open a transaction, serve a form, and wait for a user to submit it and commit that in the same transaction, because what if the user walks away? But if a transaction doesn't extend to the actual user action then it's basically useless; you can't do transactional read-modify-write when the one doing the modifying is the user.

After all, what do you do when a transaction fails? Most webapps either retry or fail (if they even bother to handle that case at all), but you don't need transactions to do either of those. In an actual database application you can tell the user their transaction didn't commit and ask them to deal with it, but again you can't really do that over the HTTP request/response cycle (because what if the user submits the form and walks away? They expect their input to be saved, whatever happens on your backend).

Re:You don’t need to be “enterprise-ready” or “scalable” by hnfong on Saturday June 04, 2022 @01:32PM (#31623040)
What is the alternative? Use distributed databases that don't guarantee atomicity at all, and write up complicated solutions to work around it? Or are there some non-transactional, atomic databases that more nicely fit the web model that I don't know about?
Re:You don’t need to be “enterprise-ready” or “scalable” by lmm on Wednesday June 08, 2022 @09:50PM (#31676752)
You have to write the "complicated solutions" anyway. SQL just lets you paper over the problem for longer. 99% of webapps lose data and don't notice or care, ACID is just a stick to beat other datastores with. IME something like Cassandra offers far more actually useful advantages (collection columns, true master-master HA out of the box) than an ACID/SQL database ever can.
Re:You don’t need to be “enterprise-ready” or “scalable” by akhmatova on Friday June 03, 2022 @02:15AM (#31604865)
That must have been what they were thinking when they made the decision to go with Cassandra.
Re:You don’t need to be “enterprise-ready” or “scalable” by lmm on Friday June 03, 2022 @05:32AM (#31606113)
I'm working on a system that's using Cassandra on a small scale (like, probably less than a million entities) now, it's great. Haven't had any consistency issues because we've designed our data flow properly (SQL will help you paper over a bad data flow for longer but that's a double-edged sword), and getting true just-works HA (master-master where a failover doesn't interrupt your writes) out of the box is a huge advantage over something like Postgres.
Re:You don’t need to be “enterprise-ready” or “scalable” by akhmatova on Friday June 03, 2022 @12:24PM (#31610451)
Oh, I don't dispute that there are valid use cases.

But the above instance sounds like a variant of the "because, bwah, SQL is hard" line of thought that seems to have powered much of the (now historical) NoSQL boom.

Re:You don’t need to be “enterprise-ready” or “scalable” by bee_rider on Tuesday May 31, 2022 @05:04PM (#31574929)
This completely tangential, but any time I see someone talking about normalizing a database, I briefly think they are talking about doing something like:

x/|x|

Ya know, like normalizing a vector. Of course this brief confusion doesn't matter, I sort it out quickly, and it is totally clear language to other database people -- it is just a funny quirk of overloaded lingo.

But I wonder if as big data and machine learning folks (since there's some overlap with Linear Algebra there) ever get their lingo mixed up.

"To predict where the ridesharing customers will want to go, we will apply the taxicab norm to our database."

Re:You don’t need to be “enterprise-ready” or “scalable” by adepressedthrow on Tuesday May 31, 2022 @05:30PM (#31575194)
While the overloading is annoying, database normalization actually has a strict definition that is not unlike the standard mathematical use; that is, to imply consistency (to make normal): https://en.wikipedia.org/wiki/Database_normalization

I would also point out that normalization within mathematics does not have a single concrete definition either, and it depends on your domain and desired property to stabilize: https://en.wikipedia.org/wiki/Normalization_(statistics)

Re:You don’t need to be “enterprise-ready” or “scalable” by bee_rider on Wednesday June 01, 2022 @01:45PM (#31585420)
Just to be clear -- I'm not annoyed really, I actually find these little momentary confusions to be a charming little quirk of our language. And I think it is not a big deal anyway, 99% of the time we're talking inside our fields where it is obvious what we mean.
Re:You don’t need to be “enterprise-ready” or “scalable” by mbrodersen on Wednesday June 01, 2022 @09:07PM (#31590136)
You are absolutely right. 95% of problems in software development are created by the software developers themselves. The fastest/smartest developers I have worked with simply make less dumb mistakes. They keep it simple. That’s all they have to do to be 10x more productive.