News for hackers. Stuff that matters.
Re:Use one big server by zmmmmm on Tuesday August 02, 2022 @06:33PM (#32325132)
I have to say I disagree with this ... you can only separate them if they are really, truly independent. Trying to separate things that are actually coupled will quickly take you on a path to hell.

The problem here is that most of the microservice architecture divisions are going to be driven by Conway's law, not what makes any technical sense. So if you insist on separate databases per microservice, you're at high risk of ending up with massive amounts of duplicated and incoherent state models and half the work of the team devoted to synchronizing between them.

I quite like an architecture where services are split except the database, which is considered a service of its own.

Re:Use one big server by marcosdumay on Tuesday August 02, 2022 @11:46PM (#32327429)
Well, I stand by what I said. And you are also correct, you can only separate them if they are really truly independent. Those two are correct at the same time.

Microservices does more than encapsulation and workspace segmentation. They also distribute data locality and coherence. If you have an organizational need to break something, but not on independent parts, it's better to use some abstraction that preserves the data properties.

(In other words, microservices are almost never the answer. There are plenty of ways to organize your code, default to those other ones. And on the few cases that microservices are the answer, rest assured that you won't fail to notice it.)

Re:Use one big server by lelanthran on Wednesday August 03, 2022 @05:11AM (#32329393)
>> If you are creating microservices, you must segment them all the way through.

> I have to say I disagree with this ... you can only separate them if they are really, truly independent. Trying to separate things that are actually coupled will quickly take you on a path to hell.

I could be misinterpreting both you and GP, but sounds like you agree with GP - if you can't segment them all the way through, maybe they shouldn't be microservices?

Re:Use one big server by zmmmmm on Wednesday August 03, 2022 @09:51PM (#32338475)
Perhaps - but I think they are underestimating the organisational reasons to separate services from each other. If you are really going to say "we can't separate any two things that have any shared persistent data" then you may just end up with a monolith and all the problems that come from that (gridlock because every team needs to agree before it can be updated / released etc).