News for hackers. Stuff that matters.
Re:Stop building databases by pdonis on Friday December 01, 2023 @06:39PM (#38494130)
What many people either can't or don't want to acknowledge is that ultimately whether or not you support live updates in parallel by multiple users, instead of locking so only one update can proceed at a time, is not a technical decision, it's a business decision: do the business rules that are appropriate for your application enable you to deal with concurrent live updates or not?

Ultimately that comes down to whether you can implement a process to ensure consistent resolution of any incompatibilities between multiple concurrent updates. Sometimes that can be done, and sometimes it can't, and which is the case for your application depends on your business rules, not on any technical capability.

If your business rules don't allow you to implement a resolution mechanism, you need locking so that only one update can happen at a time, whether you have the technical capability to support concurrent updates or not.

Re:Stop building databases by Terr_ on Friday December 01, 2023 @07:52PM (#38494665)
Indeed, many of the most painful technical problems are actually three business problems in a trenchcoat.
Re:Stop building databases by pdonis on Friday December 01, 2023 @08:27PM (#38494896)
This literally made me lol. :-)
Re:Stop building databases by fho on Saturday December 02, 2023 @03:39AM (#38497077)
So true ... and often those business decision are not yours to make.
Re:Stop building databases by ok_dad on Saturday December 02, 2023 @10:21AM (#38499168)
This is one of those phrases that should turn into a saying, and be passed around for hundreds of years.

Every hard problem I have today in my career involves getting business people to define their business problem properly in order to solve it with technology. Even the hardest code I've ever written was easy compared to some projects, simply due to the business issues lurking around the project. Last week I finished a script to download a CSV and save it to a SQL table (literally) that took 3 weeks because business folks couldn't get their act together on what they wanted. I finished another project in a few days which is currently the core of a previous employers energy efficiency controls product which was easy because the person defining it did it very well, and I had no questions, just work to perform.

Re:Stop building databases by hinkley on Saturday December 02, 2023 @09:53PM (#38504365)
Sometimes known as, "two people with firing authority fighting a proxy war through the dev team".
Re:Stop building databases by lmm on Saturday December 02, 2023 @03:33AM (#38497046)
Nah. I've seen plenty of systems where the business rules would handle concurrent updates fine, but since they're using a traditional Web/ORM/RDBMS setup they build a last-write-wins system without thinking about it. It's one of those rare problems where the technical part is actually harder than the business part.
Re:Stop building databases by pdonis on Saturday December 02, 2023 @07:17PM (#38503549)
Database systems have been able to deal with concurrent updates for quite some time now, so I don't think doing this is technically difficult with the current state of the art. Individual dev teams might not be well versed in the current state of the art, but the correct business response to that is not to restrict your business rules but to get developers who are well versed in the current state of the art.
Re:Stop building databases by lmm on Saturday December 02, 2023 @09:36PM (#38504273)
> Database systems have been able to deal with concurrent updates for quite some time now, so I don't think doing this is technically difficult with the current state of the art.

Traditional ACID systems can't really handle them nicely - your only choice with an update is to commit it or discard it - so you have to do a lot of handwritten logic on top, and even if the database itself handles that well, the layers above it generally don't. Event-sourcing style systems work well but they're still not really mainstream yet.